abraunegg / onedrive

OneDrive Client for Linux
https://abraunegg.github.io
GNU General Public License v3.0
9.63k stars 849 forks source link

Bug: Inconsistencies When Interrupted During Download Activity #2660

Closed JC-comp closed 4 months ago

JC-comp commented 4 months ago

Describe the bug

Remote files fail to download if download activity is interrupted without resynchronization. #2637 is to address this issue.

Operating System Details

-

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-80-ge895a11

What is your OneDrive Application Configuration

-

What is your 'curl' version

-

Where is your 'sync_dir' located

Local

What are all your system 'mount points'

-

What are all your local file system partition types

-

How do you use 'onedrive'

-

Steps to reproduce the behaviour

$ for i in {1..100}; do touch $i; done $ onedrive --sync $ rm * $ onedrive --sync --resync // Interrupt during download process Downloading file ./39 ... done Downloading file ./49 ... done Downloading file ./12 ... done ^C $ onedrive --sync // files are not in sync

Complete Verbose Log Output

Reading configuration file: /home/alan/.config/onedrive/config
Invalid value for key in config file - using default value: monitor_interval
Configuration file successfully loaded

The usage of --resync will delete your local 'onedrive' client state, thus no record of your current 'sync status' will exist.
This has the potential to overwrite local versions of files with perhaps older versions of documents downloaded from OneDrive, resulting in local data loss.
If in doubt, backup your local data before using --resync

Are you sure you wish to proceed with --resync? [Y/N] y

Deleting the saved application sync status ...
Using IPv4 and IPv6 (if configured) for all network operations
Configuring Global Azure AD Endpoints
Fetching items from the OneDrive API for Drive ID: af2b5e52bea96776 ..
Processing 101 applicable changes and items received from Microsoft OneDrive .
Downloading file ./95 ... done
Downloading file ./42 ... done
Downloading file ./5 ... done
Downloading file ./79 ... done
Downloading file ./88 ... done
Downloading file ./39 ... done
Downloading file ./49 ... done
Downloading file ./12 ... done
^C

Reading configuration file: /home/alan/.config/onedrive/config
Invalid value for key in config file - using default value: monitor_interval
Configuration file successfully loaded
Using IPv4 and IPv6 (if configured) for all network operations
Configuring Global Azure AD Endpoints
Fetching items from the OneDrive API for Drive ID: af2b5e52bea96776 ..
No additional changes or items that can be applied were discovered while processing the data received from Microsoft OneDrive
Performing a database consistency and integrity check on locally stored data ..
Scanning the local file system '~/OneDrive' for new data to upload .
Performing a last examination of the most recent online data within Microsoft OneDrive to complete the reconciliation process
Fetching items from the OneDrive API for Drive ID: af2b5e52bea96776 .
No additional changes or items that can be applied were discovered while processing the data received from Microsoft OneDrive

Sync with Microsoft OneDrive is complete

Screenshots

No response

Other Log Information or Details

No response

Additional context

No response

abraunegg commented 4 months ago

@JC-comp Please re-read my reasoning as you are not understanding the code.

JC-comp commented 4 months ago

@abraunegg This is a bug report concerning file inconsistency that remote files are not being downloaded in this case. To confirm, is this inconsistency expected behavior and not a bug that needs to be fixed?

abraunegg commented 4 months ago

This is why --resync exists to fix sync inconsistencies

abraunegg commented 4 months ago

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.