News:

When registered with our forums, feel free to send a "here I am" post here to differ human beings from SPAM bots.

Main Menu

C::B breaking unix hardlinks

Started by amonett84, August 19, 2014, 09:09:23 AM

Previous topic - Next topic

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.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

amonett84

Ok, is it possible to stop this functionality?


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.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]