hardlinkpy icon indicating copy to clipboard operation
hardlinkpy copied to clipboard

Bytes saved doesn't take into account if link destination file was already linked

Open chadnetzer opened this issue 7 years ago • 0 comments

The bytes saved calculation doesn't take into account whether the destination file is already hardlinked, which makes the result overly optimistic. If a destination file is already hardlinked, it shouldn't count towards the bytes saved in did_hardlink().

If/when the stat_info data saved to file_hashes is kept up to date after the link() operation, we could use it to properly calculate the amount of bytes saved (basically when a link destination file has a link count of 1).

chadnetzer avatar Jul 03 '18 06:07 chadnetzer