[Geany-devel] Overwriting a link on save as

Colomban Wendling lists.ban at xxxxx
Tue Mar 1 23:57:01 UTC 2011


Hi all,

A user (yecril71pl) on #geany reported that saving as a file with the
name of a symbolic link correctly ask for replacing but will try to
modify the file at the location pointed by the link rather than
replacing the link by a new file. This is IMHO at least not expected,
and may be problematic if e.g. the target of that link isn't writable,
since the write will fail (if using unsafe file saving).

I then suggest to delete the file on "save as" if we see it's a symbolic
link, so we will create a fresh new file with the proper name.

I attach a patch for this, but I'm not sure it's really the right
way/place to do this.

Any thoughts?


Kind regards,
Colomban
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Fix-overwriting-a-link-to-an-unwritable-file-when-not-using-safe_file_saving.patch
Type: text/x-patch
Size: 1955 bytes
Desc: not available
URL: <http://lists.geany.org/pipermail/devel/attachments/20110302/059e09e6/attachment.bin>


More information about the Devel mailing list