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

Detect file sizes changing during Copy #1250

Closed
ncw opened this issue Mar 18, 2017 · 3 comments
Closed

Detect file sizes changing during Copy #1250

ncw opened this issue Mar 18, 2017 · 3 comments
Assignees
Milestone

Comments

@ncw
Copy link
Member

ncw commented Mar 18, 2017

In Copy, check to see if can read more bytes from the reader after the copy has finished.

If this is the case, then make an error - "file size changed while copying" and abort the copy.

This would have detected #902 also.

@ncw ncw added this to the v1.37 milestone Mar 18, 2017
@ncw ncw modified the milestones: v1.37, v1.38 Jul 19, 2017
@daylightbrightledlight
Copy link

Maybe instead of aborting the copy, it should spit out an error and move onto the next copy. This is if you're assuming there are multiple files being copied.

@ncw ncw modified the milestones: v1.38, v1.39 Sep 30, 2017
@ncw ncw modified the milestones: v1.39, v1.40 Jan 11, 2018
@ishuah ishuah self-assigned this Jan 17, 2018
@ncw
Copy link
Member Author

ncw commented Jan 22, 2018

Note that there are some similar discussions on the forum - I came up with this

What I'm imagining is that during a transfer in the local backend, rclone would check the size and modification time of the file it is transferring every 10s (say). If the size or mod time differs from when the transfer was started then it will abort the transfer.

That might fix this issue better as it will detect the change before rclone gets to the end.

@ncw
Copy link
Member Author

ncw commented Feb 2, 2018

This fix should be in the latest beta in 30 mins or so!

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

No branches or pull requests

3 participants