onedrive-d-old icon indicating copy to clipboard operation
onedrive-d-old copied to clipboard

Adding files to ignore causes them to be removed from OneDrive

Open farvour opened this issue 8 years ago • 2 comments

This is a pretty bad bug:

[2015-09-05 13:34:31,823] DEBUG: MainThread: added task "sy" "/home/farvour/OneDrive".
[2015-09-05 13:34:31,823] DEBUG: worker0: got task: sy on "/home/farvour/OneDrive"
[2015-09-05 13:34:32,735] DEBUG: worker0: added task "rm" "/home/farvour/OneDrive/Pictures".
[2015-09-05 13:34:32,736] DEBUG: worker1: got task: rm on "/home/farvour/OneDrive/Pictures"
[2015-09-05 13:34:32,877] DEBUG: worker0: added task "rm" "/home/farvour/OneDrive/Documents".
[2015-09-05 13:34:32,877] DEBUG: worker3: got task: rm on "/home/farvour/OneDrive/Documents"
[2015-09-05 13:34:33,043] DEBUG: worker0: added task "rm" "/home/farvour/OneDrive/Music".
[2015-09-05 13:34:33,044] DEBUG: worker2: got task: rm on "/home/farvour/OneDrive/Music"

If you add a glob pattern to the ignore_v2.ini file, and remove the directories locally, onedrive-d actually goes out of its way to REMOVE items from the remote OneDrive API (moves to trash) instead of checking against the ignore globs first.

This should probably not happen, and the onedrive-d client should just keep track of globbed entries that match the ignore pattern to determine whether to add tasks to actually execute the .api.rm call (exclusive set).

Assuming that a local entry that doesn't exist or is ignored is causal for removal remotely is really dangerous. I suspect this particular incident happened because of the journal files existing because once I removed them, and started over, it was fine.

The only way I figured this out was a giant collection of my Photos and Movies had been essentially "Moved to Trash" when they started getting removed from my MacBook's OneDrive checkout. They were not lost however, as I was able to restore from the OneDrive web interface easily. :)

farvour avatar Sep 05 '15 20:09 farvour

It's indeed a bug and fixed in new version.

Sincerely, Xiangyu Bu

Sent from my Windows Phone


From: Thomas Farvourmailto:[email protected] Sent: ‎9/‎5/‎2015 4:42 PM To: xybu/onedrive-d-oldmailto:[email protected] Subject: [onedrive-d-old] Adding files to ignore causes them to be removed from OneDrive (#179)

This is a pretty bad bug:

If you add a glob pattern to the default_ignore.ini file, onedrive-d actually goes out of its way to REMOVE items from the remote OneDrive API (moves to trash).

This should probably not happen, and the onedrive-d client should just keep track of globbed entries that match the ignore pattern to determine whether to add tasks to actually execute the .api.rm call.

Assuming that a local entry that doesn't exist or is ignored is causal for removal remotely is really dangerous. The only way I figured this out was a giant collection of my Photos and Movies had been essentially "Moved to Trash" when they started getting removed from my MacBook's OneDrive checkout.

Bad.


Reply to this email directly or view it on GitHub: https://github.com/xybu/onedrive-d-old/issues/179

xybu avatar Sep 06 '15 00:09 xybu

Great! I was able to work around it by just removing the entries dB and journal so it started ignoring properly.

Best Regards, T On Sep 5, 2015 5:11 PM, "Xiangyu Bu" [email protected] wrote:

It's indeed a bug and fixed in new version.

Sincerely, Xiangyu Bu

Sent from my Windows Phone


From: Thomas Farvourmailto:[email protected] Sent: ‎9/‎5/‎2015 4:42 PM To: xybu/onedrive-d-oldmailto:[email protected] Subject: [onedrive-d-old] Adding files to ignore causes them to be removed from OneDrive (#179)

This is a pretty bad bug:

If you add a glob pattern to the default_ignore.ini file, onedrive-d actually goes out of its way to REMOVE items from the remote OneDrive API (moves to trash).

This should probably not happen, and the onedrive-d client should just keep track of globbed entries that match the ignore pattern to determine whether to add tasks to actually execute the .api.rm call.

Assuming that a local entry that doesn't exist or is ignored is causal for removal remotely is really dangerous. The only way I figured this out was a giant collection of my Photos and Movies had been essentially "Moved to Trash" when they started getting removed from my MacBook's OneDrive checkout.

Bad.


Reply to this email directly or view it on GitHub: https://github.com/xybu/onedrive-d-old/issues/179

— Reply to this email directly or view it on GitHub https://github.com/xybu/onedrive-d-old/issues/179#issuecomment-138011320 .

farvour avatar Sep 06 '15 01:09 farvour