-
-
Notifications
You must be signed in to change notification settings - Fork 871
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
Bug: cleanup_local_files also deleting files present online #2612
Comments
It will take me a few days to review - as per my prior email I am unable to reproduce this, so I will have to re look at your steps to see if this can be reproduced. By still having a folder online with a misleading name, it is potentially getting tripped up with that ... ie - a Shared Folder with same name as a non-shared folder .. and potentially this is why it is being deleted. The clue here is this statement:
This means that there is potentially 2 entries in the DB for that file - one that references your drive id, and the other referencing the shared folder drive id - which is why that message could be generated as there should only be one entry - the remote record. Can you confirm that you have cleaned up all of your folders / shared folders / links and any other erroneous folders locally & online that were caused by the '%20' folder name problem .. as this would be a major contributor to the issue you are seeing. |
Yes, I deleted all the old entries and created new ones already about two weeks ago. So unless they were again created wrongfully (but then sync would fail/show errors, wouldn't it?) it should be fine. |
@robertschulze |
@abraunegg |
Many thanks for your patience and data. The issue has been found and corrected. Please refer to my email for further details. |
@abraunegg Perfect, I can confirm that the bug is solved. Thanks! |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Describe the bug
I use onedrive in conjunction in a
download_only = "true"
configuration. I want to make sure that files deleted online are also deleted locally. However, when selecting the optioncleanup_local_files = "true"
all files are being deleted, regardless of whether they are present online or not. This happens for normal as well as --resync type synchronizations.Operating System Details
Linux atom 5.15.0-91-generic #101-Ubuntu SMP Tue Nov 14 13:30:08 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 22.04.3 LTS Release: 22.04 Codename: jammy
Client Installation Method
From Source
OneDrive Account Type
Personal
What is your OneDrive Application Version
v2.5.0-alpha-5 GitHub version: v2.4.25-45-gc8d29c8
What is your OneDrive Application Configuration
What is your 'curl' version
Where is your 'sync_dir' located
Network
What are all your system 'mount points'
//hyperv/3 on /media/3 type cifs (rw,relatime,vers=2.1,cache=strict,username=Administrator,uid=1000,noforceuid,gid=100,noforcegid,addr=192.168.3.11,file_mode=0777,dir_mode=0777,soft,nounix,serverino,mapposix,rsize=1048576,wsize=1048576,bsize=1048576,echo_interval=60,actimeo=1,closetimeo=1)
What are all your local file system partition types
How do you use 'onedrive'
./onedrive --confdir='/home/robert/.config/onedrive/accounts/robert@guitaronline.de' --synchronize --verbose --verbose --resync > debug_output.log 2>&1
Steps to reproduce the behaviour
this was my initial test:
so I tested further:
3. initial sync with cleanup_local_files = false
4. --resync with cleanup_local_files = false --> all good
so I created two test files:
TestWordfile.docx
is a file that is stored online (and should thus be kept)test.txt
is a file that is stored locally only (and should thus be deleted)In below log extract one can see that
TestWordfile.docx
is correctly considered a Remote Object but wrongfully considered not present online (DEBUG: Selecting Record that is NOT Remote Object
)test.txt
is wrongfully considered a Remote Object (Record is a Remote Object
) but correctly considered not present onlineComplete Verbose Log Output
Screenshots
No response
Other Log Information or Details
I will send full logs for all above steps via mail
Additional context
No response
The text was updated successfully, but these errors were encountered: