Skip to content
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: logs blame skip_dir config instead of skip_file #3173

Closed
Romadelf opened this issue Mar 23, 2025 · 2 comments · Fixed by #3176
Closed

Bug: logs blame skip_dir config instead of skip_file #3173

Romadelf opened this issue Mar 23, 2025 · 2 comments · Fixed by #3176
Labels
Bug Something isn't working Fixed
Milestone

Comments

@Romadelf
Copy link

Describe the bug

In src/sync.d, search for the string "Skipping file - excluded by skip_dir config:". Then, you will see that what is actually tested there (in at least 1 of the 3 matches you get) is the skip_file pattern. I got confuse slightly by the logs. Minor, but could you adjust the debug log ?

Operating System Details

Linux belalachnos 6.8.0-55-generic #57-Ubuntu SMP PREEMPT_DYNAMIC Wed Feb 12 23:42:21 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux

No LSB modules are available.
Distributor ID:	Linuxmint
Description:	Linux Mint 22.1
Release:	22.1
Codename:	xia

Client Installation Method

From Source

OneDrive Account Type

Business | Office365

What is your OneDrive Application Version

onedrive v2.5.5-5-g0389483

What is your OneDrive Application Configuration

bwak@belalachnos:~$ onedrive --display-config
Reading configuration file: /home/bwak/.config/onedrive/config
Configuration file successfully loaded

WARNING: Your cURL/libcurl version (8.5.0) has known operational bugs that impact the use of this client.
         Please report this to your distribution, requesting an update to a newer cURL version, or consider upgrading it yourself for optimal stability.

Application version                          = onedrive v2.5.5-5-g0389483
Compiled with                                = LDC 2110
Curl version                                 = libcurl/8.5.0 OpenSSL/3.0.13 zlib/1.3.1 brotli/1.1.0 zstd/1.5.5 libidn2/2.3.7 libpsl/0.21.2 (+libidn2/2.3.7) libssh/0.10.6/openssl/zlib nghttp2/1.59.0 librtmp/2.3 OpenLDAP/2.6.7
User Application Config path                 = /home/bwak/.config/onedrive
System Application Config path               = /etc/onedrive
Applicable Application 'config' location     = /home/bwak/.config/onedrive/config
Configuration file found in config location  = true - using 'config' file values to override application defaults
Applicable 'sync_list' location              = /home/bwak/.config/onedrive/sync_list
Applicable 'items.sqlite3' location          = /home/bwak/.config/onedrive/items.sqlite3
Config option 'drive_id'                     = 
Config option 'sync_dir'                     = ~/OneDrive
Config option 'enable_logging'               = false
Config option 'log_dir'                      = /var/log/onedrive
Config option 'disable_notifications'        = false
Config option 'skip_dir'                     = 
Config option 'skip_dir_strict_match'        = false
Config option 'skip_file'                    = ~*|.~*|*.tmp|*.swp|*.partial
Config option 'skip_dotfiles'                = false
Config option 'skip_symlinks'                = false
Config option 'monitor_interval'             = 300
Config option 'monitor_log_frequency'        = 12
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 'disable_permission_set'       = false
Config option 'transfer_order'               = default
Config option 'classify_as_big_delete'       = 1000
Config option 'disable_upload_validation'    = false
Config option 'disable_download_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 'permanent_delete'             = false
Config option 'write_xattr_data'             = false
Config option 'application_id'               = d50ca740-c83f-4d1b-b616-12c519384f0c
Config option 'azure_ad_endpoint'            = 
Config option 'azure_tenant_id'              = 
Config option 'user_agent'                   = ISV|abraunegg|OneDrive Client for Linux/v2.5.5-5-g0389483
Config option 'force_http_11'                = true
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'                 = 60
Config option 'ip_protocol_version'          = 1
Config option 'threads'                      = 8
Config option 'max_curl_idle'                = 120
Environment var 'XDG_RUNTIME_DIR'            = true
Environment var 'DBUS_SESSION_BUS_ADDRESS'   = true
Config option 'notify_file_actions'          = false

Selective sync 'sync_list' configured        = false

Config option 'sync_business_shared_items'   = false

Config option 'webhook_enabled'              = false
bwak@belalachnos:~$ onedrive -s -v -v --dry-run | grep "Skipping"
DEBUG: Skipping file - excluded by skip_dir config: /~Pedagogical engagement.url
DEBUG: Skipping file - excluded by skip_dir config: /~ TP3_2022~Inversion - Shortcut.lnk

What is your 'curl' version

bwak@belalachnos:~$ curl --version
curl 8.5.0 (x86_64-pc-linux-gnu) libcurl/8.5.0 OpenSSL/3.0.13 zlib/1.3 brotli/1.1.0 zstd/1.5.5 libidn2/2.3.7 libpsl/0.21.2 (+libidn2/2.3.7) libssh/0.10.6/openssl/zlib nghttp2/1.59.0 librtmp/2.3 OpenLDAP/2.6.7
Release-Date: 2023-12-06, security patched: 8.5.0-2ubuntu10.6
Protocols: dict file ftp ftps gopher gophers http https imap imaps ldap ldaps mqtt pop3 pop3s rtmp rtsp scp sftp smb smbs smtp smtps telnet tftp
Features: alt-svc AsynchDNS brotli GSS-API HSTS HTTP2 HTTPS-proxy IDN IPv6 Kerberos Largefile libz NTLM PSL SPNEGO SSL threadsafe TLS-SRP UnixSockets zstd

Where is your 'sync_dir' located

Local

What are all your system 'mount points'

bwak@belalachnos:~$ mount
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
udev on /dev type devtmpfs (rw,nosuid,relatime,size=3744968k,nr_inodes=936242,mode=755,inode64)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
tmpfs on /run type tmpfs (rw,nosuid,nodev,noexec,relatime,size=757196k,mode=755,inode64)
efivarfs on /sys/firmware/efi/efivars type efivarfs (rw,nosuid,nodev,noexec,relatime)
/dev/sda2 on / type ext4 (rw,relatime,errors=remount-ro)
securityfs on /sys/kernel/security type securityfs (rw,nosuid,nodev,noexec,relatime)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev,inode64)
tmpfs on /run/lock type tmpfs (rw,nosuid,nodev,noexec,relatime,size=5120k,inode64)
cgroup2 on /sys/fs/cgroup type cgroup2 (rw,nosuid,nodev,noexec,relatime,nsdelegate,memory_recursiveprot)
pstore on /sys/fs/pstore type pstore (rw,nosuid,nodev,noexec,relatime)
bpf on /sys/fs/bpf type bpf (rw,nosuid,nodev,noexec,relatime,mode=700)
systemd-1 on /proc/sys/fs/binfmt_misc type autofs (rw,relatime,fd=32,pgrp=1,timeout=0,minproto=5,maxproto=5,direct,pipe_ino=323)
hugetlbfs on /dev/hugepages type hugetlbfs (rw,nosuid,nodev,relatime,pagesize=2M)
debugfs on /sys/kernel/debug type debugfs (rw,nosuid,nodev,noexec,relatime)
mqueue on /dev/mqueue type mqueue (rw,nosuid,nodev,noexec,relatime)
tracefs on /sys/kernel/tracing type tracefs (rw,nosuid,nodev,noexec,relatime)
fusectl on /sys/fs/fuse/connections type fusectl (rw,nosuid,nodev,noexec,relatime)
configfs on /sys/kernel/config type configfs (rw,nosuid,nodev,noexec,relatime)
/dev/sda1 on /boot/efi type vfat (rw,relatime,fmask=0077,dmask=0077,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro)
/dev/sdb3 on /timeshift type ext4 (rw,relatime)
/dev/sdb1 on /home type ext4 (rw,relatime)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,nosuid,nodev,noexec,relatime)
tmpfs on /run/user/1000 type tmpfs (rw,nosuid,nodev,relatime,size=757192k,nr_inodes=189298,mode=700,uid=1000,gid=1000,inode64)
gvfsd-fuse on /run/user/1000/gvfs type fuse.gvfsd-fuse (rw,nosuid,nodev,relatime,user_id=1000,group_id=1000)
portal on /run/user/1000/doc type fuse.portal (rw,nosuid,nodev,relatime,user_id=1000,group_id=1000)

What are all your local file system partition types

bwak@belalachnos:~$ lsblk -f
NAME   FSTYPE FSVER LABEL    UUID                                 FSAVAIL FSUSE% MOUNTPOINTS
sda                                                                              
├─sda1 vfat   FAT32          1F03-23F3                             500,6M     2% /boot/efi
└─sda2 ext4   1.0            0f3fbe06-91f9-4f92-a70a-cbfd43f98e08   97,2G    11% /
sdb                                                                              
├─sdb1 ext4   1.0   Parmesan 0804bca6-f221-48f7-b010-4525b41456ad  649,4G     0% /home
└─sdb3 ext4   1.0   Backer   decc4eaa-d191-4d38-bfef-bcb8bc9dad32   69,2G    19% /timeshift

How do you use 'onedrive'

Not relevant I think. I'll just say that I just installed linux and onedrive client. I wanted to download content from university of another computer using onedrive before.

Steps to reproduce the behaviour

Install my linux OS normally
Then install onedrive following install.md
Then follow usage.md up to doing the dry run with :
onedrive -s -v -v --dry-run (you may prefer single -v, but I used grep "Skipping" instead )

Complete Verbose Log Output

bwak@belalachnos:~$ onedrive -s -v -v --dry-run | grep "Skipping"
DEBUG: Skipping file - excluded by skip_dir config: /~Pedagogical engagement.url
DEBUG: Skipping file - excluded by skip_dir config: /~ TP3_2022~Inversion - Shortcut.lnk

You don't need anything else, do you ?

Screenshots

No response

Other Log Information or Details

Additional context

No response

@Romadelf Romadelf added the Bug Something isn't working label Mar 23, 2025
@abraunegg abraunegg added Not a bug Bug Something isn't working and removed Bug Something isn't working Not a bug labels Mar 23, 2025
@abraunegg
Copy link
Owner

@Romadelf

Please can you test the following PR to potentially resolve your issue.

To test the PR, first install all the require platform dependencies to build the client on your respective platforms. Please read https://github.com/abraunegg/onedrive/blob/master/docs/install.md#building-from-source---high-level-requirements and then follow correctly for your platform.

Important

Currently there is an issue with installing the DMD or LDC compiler using the documentation instructions:
curl -fsS https://dlang.org/install.sh | bash -s dmd or curl -fsS https://dlang.org/install.sh | bash -s ldc

This is not something I can solve and I have emailed the appropriate folk and raised dlang/dmd#20830

Please augment the installation of DMD or LDC with your distribution version if it is available

Once this is done, to clone the PR to resolve your issue, you can use a script like the following:

#!/bin/bash

PR=3176

rm -rf ./onedrive-pr${PR}
git clone https://github.com/abraunegg/onedrive.git onedrive-pr${PR}
cd onedrive-pr${PR}
git fetch origin pull/${PR}/head:pr${PR}
git checkout pr${PR}

# Configure and Build
./configure --enable-debug --enable-notifications; make clean; make;
./onedrive --version

This script will create a local folder called onedrive-pr3176 with the PR version.

To run the PR, you need to run the client from the PR build directory:

./onedrive <any other options needed>

To install the PR, you will need to perform sudo make install to install the PR version to your system.

When running the PR, your version should be: onedrive v2.5.5-3-g07a6793 or greater.

If you still encounter an issue, please generate a new verbose debug log following this process: https://github.com/abraunegg/onedrive/wiki/Generate-debug-log-for-support

@Romadelf
Copy link
Author

Hi,

I so I fetched the fix branch (with commit 07a679...) on the repo downloaded and kept after initial installation, checked it out on it, ran the configure, and executed ./onedrive -s -v --dry-run with no config or sync_list file. I am guessing it is ok not to 100% follow your script word-for-word. Anyway, the output shows that the trivial string change in the code is implemented. Can be considered done in my view.

Processing API Response Bundle: 36 - Quantity of 'changes|items' in this bundle to process: 253
Skipping file - excluded by skip_file config: /~Pedagogical engagement.url
Processing API Response Bundle: 37 - Quantity of 'changes|items' in this bundle to process: 237

I'll just say that I did not double check if all matching 3 lines of sync.d needed the update (nor which one is involved here), but guess you are right to change them all, given the code comments.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working Fixed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants