xybu / onedrived-dev

A Microsoft OneDrive client for Linux, written in Python3.
https://github.com/xybu/onedrived-dev
MIT License
706 stars 78 forks source link

program deletes cloud storage if empty local folder found on first sync #119

Open magnessk opened 5 years ago

magnessk commented 5 years ago

Hi, When reinstalling the new version, I left an empty onedrive folder in my home directory, which I believe caused the complete emptying of my onedrive cloud storage. I was able to recover all data by restoring it from the cloud recycle bin, but it certainly gave me a shock! perhaps include a rule that the program cannot delete anything on the first sync? or for a certain time period, to ensure that files arent accidentally deleted?

Thank you so much for this program, and have a great day!!!

derrix060 commented 5 years ago

The framework requires a confirmation when you set a driver to an existing dir already: https://github.com/derrix060/onedriveClient/blob/master/onedrive_client/od_pref.py#L331

click.confirm('Syncing with directory "%s"? Be careful!! If this directory was cleaned '
                     'recently, all your files will be deleted from cloud. Type Ctrl + C to '
                     'abort the operation. Do you want to continue?' % local_root):
magnessk commented 5 years ago

Interesting, I didnt receive this notification. I'll upload my log file in a couple hours (earliest opprotunity).

On Tue, Feb 19, 2019, 1:15 PM Mario Apra notifications@github.com wrote:

The framework requires a confirmation when you set a driver to an existing dir already: https://github.com/derrix060/onedriveClient/blob/master/onedrive_client/od_pref.py#L331

click.confirm('Syncing with directory "%s"? Be careful!! If this directory was cleaned ' 'recently, all your files will be deleted from cloud. Type Ctrl + C to ' 'abort the operation. Do you want to continue?' % local_root):

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/xybu/onedrived-dev/issues/119#issuecomment-465312819, or mute the thread https://github.com/notifications/unsubscribe-auth/AioBpQuKE2TpI8B7wNdbsYEm8XHsreZeks5vPGldgaJpZM4bD2q7 .