abraunegg / onedrive

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

Bug: Incomplete drive list #2771

Closed megamisan closed 2 months ago

megamisan commented 2 months ago

Describe the bug

When using option --get-O365-drive-id, it is not possible to list all drives of a site with more the 200 entries. Pagination is not respected.

Operating System Details

Linux ubuntu2204 6.5.0-45-generic #45~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Mon Jul 15 16:40:02 UTC 2 x86_64 x86_64 x86_64 GNU/Linux

Client Installation Method

From Distribution Package

OneDrive Account Type

SharePoint

What is your OneDrive Application Version

2.4.25

What is your OneDrive Application Configuration

onedrive version                             = v2.4.25-13-g1a88d33
Config path                                  = /home/user/.config/onedrive
Config file found in config path             = false
Config option 'sync_dir'                     = /home/user/OneDrive
Config option 'enable_logging'               = false
Config option 'log_dir'                      = /var/log/onedrive/
Config option 'disable_notifications'        = false
Config option 'min_notify_changes'           = 5
Config option 'skip_dir'                     = 
Config option 'skip_dir_strict_match'        = false
Config option 'skip_file'                    = ~*|.~*|*.tmp
Config option 'skip_dotfiles'                = false
Config option 'skip_symlinks'                = false
Config option 'monitor_interval'             = 300
Config option 'monitor_log_frequency'        = 6
Config option 'monitor_fullscan_frequency'   = 12
Config option 'read_only_auth_scope'         = false
Config option 'dry_run'                      = false
Config option 'upload_only'                  = false
Config option 'download_only'                = false
Config option 'local_first'                  = false
Config option 'check_nosync'                 = false
Config option 'check_nomount'                = false
Config option 'resync'                       = false
Config option 'resync_auth'                  = false
Config option 'cleanup_local_files'          = false
Config option 'classify_as_big_delete'       = 1000
Config option 'disable_upload_validation'    = false
Config option 'bypass_data_preservation'     = false
Config option 'no_remote_delete'             = false
Config option 'remove_source_files'          = false
Config option 'sync_dir_permissions'         = 700
Config option 'sync_file_permissions'        = 600
Config option 'space_reservation'            = 52428800
Config option 'application_id'               = 
Config option 'azure_ad_endpoint'            = 
Config option 'azure_tenant_id'              = common
Config option 'user_agent'                   = 
Config option 'force_http_11'                = false
Config option 'debug_https'                  = false
Config option 'rate_limit'                   = 0
Config option 'operation_timeout'            = 3600
Config option 'dns_timeout'                  = 60
Config option 'connect_timeout'              = 10
Config option 'data_timeout'                 = 600
Config option 'ip_protocol_version'          = 0
Config option 'sync_root_files'              = false
Selective sync 'sync_list' configured        = false
Config option 'sync_business_shared_folders' = false
Business Shared Folders configured           = false
Config option 'webhook_enabled'              = false

What is your 'curl' version

curl 7.81.0 (x86_64-pc-linux-gnu) libcurl/7.81.0 OpenSSL/3.0.2 zlib/1.2.11 brotli/1.0.9 zstd/1.4.8 libidn2/2.3.2 libpsl/0.21.0 (+libidn2/2.3.2) libssh/0.9.6/openssl/zlib nghttp2/1.43.0 librtmp/2.3 OpenLDAP/2.5.18

Where is your 'sync_dir' located

Local

What are all your system 'mount points'

Not relevant

What are all your local file system partition types

Not relevant

How do you use 'onedrive'

Not relevant

Steps to reproduce the behaviour

On Sharepoint, create a site. In this site, create more than 200 libraries.

Complete Verbose Log Output

Not relevant, there is no error, but a missing behavior.

Screenshots

No response

Other Log Information or Details

No response

Additional context

A made a fast patch to work around the issue, but I do not think it is the maintainable way to do it.

onedrive-drive-list-fix.patch

abraunegg commented 2 months ago

@megamisan Unfortunately where things are at in development of v2.5.x this will not be looked at for v2.4.x.

As you also compiled your application, please test this against v2.5.0 RC3. The details can be found here: https://github.com/abraunegg/onedrive/discussions/2770

megamisan commented 2 months ago

@abraunegg The issue is still present in RC3.

src/onedrive.d@onedrive-v2.5.0-release-candidate-3:L704-L708

Method o365SiteDrives does not support nextLink.

src/sync.d@onedrive-v2.5.0-release-candidate-3:L7480-L7521

A loop like the main loop of the current method (querySiteCollectionForDriveID) should be done with the nextLink.

megamisan commented 2 months ago

I ported my patch. I'm creating the PR with requested details.

Edit: Done.

abraunegg commented 2 months ago

@megamisan Many thanks - I was starting to create 200+ entries in a library .. greatly appreciated.

This is now merged into RC3

abraunegg commented 2 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.