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

Correctly handle '~' when present in 'log_dir' configuration option #1258

Merged
merged 2 commits into from
Feb 6, 2021

Conversation

abraunegg
Copy link
Owner

  • Correctly handle '~' when present in 'log_dir' and expand based on user and shell environment variables to ensure correct expansion.

* Handle '~' when present in 'log_dir' and expand based on user and shell environment  variables to ensure correct expansion.
@abraunegg abraunegg requested a review from norbusan February 5, 2021 21:06
@abraunegg abraunegg added this to the v2.4.10 milestone Feb 5, 2021
@abraunegg abraunegg linked an issue Feb 5, 2021 that may be closed by this pull request
keep dir as specified, no normalise
@abraunegg
Copy link
Owner Author

Without PR:

 ./onedrive --confdir '~/.config/onedrive-business/' --display-config
Configuration file successfully loaded
config file has been updated, checking if --resync needed
onedrive version                       = v2.4.9-13-ge163d57
Config path                            = /home/alex/.config/onedrive-business/
Config file found in config path       = true
Config option 'check_nosync'           = false
Config option 'sync_dir'               = /home/alex/OneDriveBusiness
Config option 'skip_dir'               = 
Config option 'skip_file'              = ~*|.~*|*.tmp
Config option 'skip_dotfiles'          = false
Config option 'skip_symlinks'          = false
Config option 'monitor_interval'       = 300
Config option 'min_notify_changes'     = 5
Config option 'log_dir'                = ~/path/to/log/dir/
Config option 'classify_as_big_delete' = 1000
Config option 'upload_only'            = false
Config option 'no_remote_delete'       = false
Config option 'remove_source_files'    = false
Config option 'sync_root_files'        = false
Selective sync 'sync_list' configured  = false
...

With PR:

 ./onedrive --confdir '~/.config/onedrive-business/' --display-config
Configuration file successfully loaded
config file has been updated, checking if --resync needed
onedrive version                       = v2.4.9-15-gbba4181
Config path                            = /home/alex/.config/onedrive-business/
Config file found in config path       = true
Config option 'check_nosync'           = false
Config option 'sync_dir'               = /home/alex/OneDriveBusiness
Config option 'skip_dir'               = 
Config option 'skip_file'              = ~*|.~*|*.tmp
Config option 'skip_dotfiles'          = false
Config option 'skip_symlinks'          = false
Config option 'monitor_interval'       = 300
Config option 'min_notify_changes'     = 5
Config option 'log_dir'                = /home/alex/path/to/log/dir/
Config option 'classify_as_big_delete' = 1000
Config option 'upload_only'            = false
Config option 'no_remote_delete'       = false
Config option 'remove_source_files'    = false
Config option 'sync_root_files'        = false
Selective sync 'sync_list' configured  = false
...

@abraunegg abraunegg merged commit 66a172d into master Feb 6, 2021
@abraunegg abraunegg deleted the fix-issue-1255 branch February 6, 2021 09:47
@github-actions
Copy link

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked and limited conversation to collaborators May 27, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug: configuration: log_dir option treats '~' literally
1 participant