bsync icon indicating copy to clipboard operation
bsync copied to clipboard

file move into subfolder doesn't seem to be detected

Open sophana opened this issue 5 years ago • 3 comments

Hi

I've moved some videos to a subfolder, and bsync wants to duplicate these videos. Is it normal that bsync proposes to copy files with same name and size in both directions (in different folders)? In these case, an optional additionnal test would be to checksum these files and if they are identical, do a file move.

sophana avatar Apr 17 '20 14:04 sophana

Hello sophana,

If you really moved the file, and the filesystem has inodes (like ext4), the move should be detected.

But if you copied it, then deleted the original file, then it will not be detected because the inode number of the file will be different.

We may think of different methods.. but it will not be easily implemented in bsync I think.

dooblem avatar Apr 20 '20 13:04 dooblem

Thanks for your response The move were made on a remote samba filesystem. This means that bsync should better be used on unix file systems. couldn't the same filename/filesize be a hint, then ask the user for the final decision between move and copy?

sophana avatar Apr 20 '20 23:04 sophana

Hello, I would be interested to see the output of ls -i on your file. Then move the file. then ls -i again on the moved file.

Yes we may use filename/filesize as a hint, before running a checksum. This is how rsync works. But it's not an easy problem to solve. I should think about it.

Pull request welcomed ;)

dooblem avatar Apr 21 '20 12:04 dooblem