User forums > Using Code::Blocks
C::B breaking unix hardlinks
(1/1)
amonett84:
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
oBFusCATed:
Yes, C::B first saves to a temp file and then renames the file to the target filename.
amonett84:
Ok, is it possible to stop this functionality?
theodleif:
Yes, but AFAIK only on a crude way:
https://github.com/theodleif/codeblocks4arduino
oBFusCATed:
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.
Navigation
[0] Message Index
Go to full version