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

Implement --sync-root-files when using a sync_list file (Issue #491) #492

Merged
merged 4 commits into from
May 9, 2019

Conversation

abraunegg
Copy link
Owner

  • Initial code to implement --sync-all-files when using a sync_list file

* Initial code to implement --sync-all-files when using a sync_list file
@abraunegg
Copy link
Owner Author

abraunegg commented May 8, 2019

To configure:

config file

  • configure sync_list
  • add sync_root_files = "true" to config file

command line

  • configure sync_list
  • add --sync-root-files to CLI

without patch:

[alex@centos7full fix-sync-root-sync_list]$ ./onedrive --confdir '~/.config/onedrive-personal' --synchronize --verbose --resync
Using Config Dir: /home/alex/.config/onedrive-personal
Deleting the saved status ...
Initializing the OneDrive API ...
Opening the item database ...
All operations will be performed in: /home/alex/OneDrivePersonal
Initializing the Synchronization Engine ...
Account Type: personal
Default Drive ID: 66d53be8a5056eca
Default Root ID: 66D53BE8A5056ECA!101
Remaining Free Space: 5368706126
Fetching details for OneDrive Root
OneDrive Root does not exist in the database. We need to add it.
Added OneDrive Root to the local database
Syncing changes from OneDrive ...
Applying changes of Path ID: 66D53BE8A5056ECA!101
Uploading differences of .
Processing root
The directory has not changed
Uploading new items of .
Skipping item - path excluded by sync_list: ./CalInstall.log
Skipping item - path excluded by sync_list: ./newfile.txt
Skipping item - path excluded by sync_list: ./kjsdfkjgsdfjkg
Applying changes of Path ID: 66D53BE8A5056ECA!101
[alex@centos7full fix-sync-root-sync_list]$ 

with patch:

[alex@centos7full fix-sync-root-sync_list]$ ./onedrive --confdir '~/.config/onedrive-personal' --display-config
onedrive version                    = v2.3.3-5-gaf43b77
Config path                         = /home/alex/.config/onedrive-personal
Config file found in config path    = true
Config option 'check_nosync'        = false
Config option 'sync_dir'            = /home/alex/OneDrivePersonal
Config option 'skip_dir'            = 
Config option 'skip_file'           = ~*|.~*|*.tmp
Config option 'skip_dotfiles'       = false
Config option 'skip_symlinks'       = false
Config option 'monitor_interval'    = 45
Config option 'min_notify_changes'  = 5
Config option 'log_dir'             = /var/log/onedrive/
Config option 'sync_root_files'      = false
Selective sync configured           = true
sync_list contents:
asdfasdfasdf
[alex@centos7full fix-sync-root-sync_list]$ 

[alex@centos7full fix-sync-root-sync_list]$ ./onedrive --confdir '~/.config/onedrive-personal' --synchronize --verbose --resync --sync-root-files
Using Config Dir: /home/alex/.config/onedrive-personal
Deleting the saved status ...
Initializing the OneDrive API ...
Opening the item database ...
All operations will be performed in: /home/alex/OneDrivePersonal
Initializing the Synchronization Engine ...
Account Type: personal
Default Drive ID: 66d53be8a5056eca
Default Root ID: 66D53BE8A5056ECA!101
Remaining Free Space: 5368706126
Fetching details for OneDrive Root
OneDrive Root does not exist in the database. We need to add it.
Added OneDrive Root to the local database
Syncing changes from OneDrive ...
Applying changes of Path ID: 66D53BE8A5056ECA!101
Uploading differences of .
Processing root
The directory has not changed
Processing CalInstall.log
Processing newfile.txt
Uploading new items of .
Skipping item - path excluded by sync_list: ./kjsdfkjgsdfjkg
Applying changes of Path ID: 66D53BE8A5056ECA!101
[alex@centos7full fix-sync-root-sync_list]$ 

@abraunegg
Copy link
Owner Author

@norbusan
Question on usability here - should this be:

  • sync_all_files
    or
  • sync_root_files

??

Personally, when writing this earlier, I was not thinking of the ambiguity this (sync_all_files) may create / imply ... where as sync_root_files makes this sound a little more specific and without ambiguity ...

Thoughts ???

@abraunegg abraunegg added this to the v2.3.4 milestone May 8, 2019
norbusan
norbusan previously approved these changes May 9, 2019
Copy link
Collaborator

@norbusan norbusan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR is fine, but I agree that the name is misleading, maybe use sync_root_files as you suggested?

@abraunegg abraunegg changed the title WIP: Implement --sync-all-files when using a sync_list file (Issue #491) Implement --sync-root-files when using a sync_list file (Issue #491) May 9, 2019
@abraunegg
Copy link
Owner Author

@norbusan
change sync_all_files -> sync_root_files change made - can you re-review & re-approve when you can

* re-align output
@abraunegg abraunegg merged commit caec1cb into master May 9, 2019
@abraunegg abraunegg deleted the Issue-#491 branch May 9, 2019 11:18
@lock
Copy link

lock bot commented Jun 8, 2019

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

@lock lock bot locked and limited conversation to collaborators Jun 8, 2019
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.

None yet

2 participants