Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

file move into subfolder doesn't seem to be detected #46

Open
sophana opened this issue Apr 17, 2020 · 3 comments
Open

file move into subfolder doesn't seem to be detected #46

sophana opened this issue Apr 17, 2020 · 3 comments

Comments

@sophana
Copy link

sophana commented Apr 17, 2020

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.

@dooblem
Copy link
Owner

dooblem commented Apr 20, 2020

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.

@sophana
Copy link
Author

sophana commented Apr 20, 2020

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?

@dooblem
Copy link
Owner

dooblem commented Apr 21, 2020

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 ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants