[Geany-devel] Overwriting a link on save as

Lex Trotman elextr at xxxxx
Wed Mar 2 00:59:31 UTC 2011

On 2 March 2011 10:57, Colomban Wendling <lists.ban at herbesfolles.org> wrote:
> 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).

Hi Colomban,

It does the same with hard linked files, ie it modifies the file
rather than replacing it, and so changes the file for all the links,
again probably not what was expected. So I think "save as" should
always delete the file (if it exists) before saving, not just on


> 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
> _______________________________________________
> Geany-devel mailing list
> Geany-devel at uvena.de
> http://lists.uvena.de/cgi-bin/mailman/listinfo/geany-devel

More information about the Devel mailing list