Code::Blocks Forums
User forums => Using Code::Blocks => Topic started by: Starky on August 19, 2014, 09:09:23 am
-
Hi all, I'm fairly new to C::B and probably just haven't found the way to configure it correctly. Let's see if I can explain this.
So I'm working on a file that has 6 hardlinks. However in C::B when I modify it and save, it changes the file's ownership to me, and breaks the link to the file I was working on. The remaining linked files now show 5 links excluding the one I just saved.
Is there a setting for this or something? Is it some sort of atomic save or something where it deletes the old file and saves the one in the editor as a new one with the old file name - thus killing the link? The file lives on a linux server.
Thanks
-
Yes, C::B first saves to a temp file and then renames the file to the target filename.
-
Ok, is it possible to stop this functionality?
-
Yes, but AFAIK only on a crude way:
https://github.com/theodleif/codeblocks4arduino
-
The proper way is to detect that the file is a link and then disable the temp+move mechanism we're using.
This is the ticket: https://sourceforge.net/p/codeblocks/tickets/276/
Patches welcome.