Hard Link Behavior Bug

The behaviour described in the bug report is either by design, or would be far too complex/time-consuming to be changed

Moderators: white, Hacker, petermad, Stefan2

Post Reply
brahman
Senior Member
Senior Member
Posts: 204
Joined: 2006-04-26, 13:27 UTC

Hard Link Behavior Bug

Post by *brahman »

Hi,

I use hard links a lot:

When I overwrite one hard linked file with a new version, the other in another folder on the same drive is updated automatically.

However, when I copy a file in the folder and then RENAME that file in the folder to a file that is hard linked, confirm it with OVERWRITE in the dialog, the hard link gets broken and I have separate files, i.e. the other file in another folder on the same drive is NOT updated.

If this behaviour is not known, the user is under the impression that he has updated as usual all copies in this way.

Regards,

Brahman
theosdikaios
Senior Member
Senior Member
Posts: 228
Joined: 2006-02-04, 13:02 UTC

Post by *theosdikaios »

IMHO it's not a bug but a logical result of "rename" and hardlinks. In your case "rename" will do the following:
1st: delete the (obsolet) destination file -> hardlink will be broken
2nd: rename the source file to destination file name

For unbroken hardlink it is necessary
1st: copy the source file to destination file
2nd: delete the source file

I don't know if there is a file manager which renames/moves files like the last way in the case that source and destination file are located at the same drive. The first way needs less resources: it is faster and needs no additional free space on the drive.

However it would be fine if TC would support hardlinked files in any way.
"Since there are many things which have never happened and never will happen,
and which nevertheless are clearly conceivable, and imply no contradiction,
how can one say they are absolutely impossible?" Leibniz
Post Reply