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

Handle a directory in the sync_dir when no permission to access (Issue #532) #536

Merged
merged 2 commits into from
Jun 14, 2019

Conversation

abraunegg
Copy link
Owner

  • Handle a directory in the sync_dir when no permission to access

* Handle a directory in the sync_dir when no permission to access
@abraunegg
Copy link
Owner Author

directory structure:

[alex@centos7full OneDrivePersonal]$ ls -la
total 4
drwxrwxr-x.  3 alex alex   21 Jun 15 07:03 .
drwx------. 30 alex alex 4096 Jun 13 10:12 ..
drwxrwx---.  2 root root    6 Jun 15 07:03 archive
[alex@centos7full OneDrivePersonal]$ 

without patch

Using Config Dir: /home/alex/.config/onedrive-personal
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: 5368709120
Fetching details for OneDrive Root
OneDrive Root exists in the database
Initializing monitor ...
OneDrive monitor interval (seconds): 45
Monitor directory: .
monitor.MonitorException@src/monitor.d(127): inotify_add_watch failed (Permission denied)
----------------
src/monitor.d:16 void monitor.Monitor.add(immutable(char)[]) [0x5edb73]
src/monitor.d:108 void monitor.Monitor.addRecursive(immutable(char)[]) [0x5ed972]
src/monitor.d:111 void monitor.Monitor.addRecursive(immutable(char)[]) [0x5ed9e0]
src/monitor.d:61 void monitor.Monitor.init(config.Config, bool, bool, bool) [0x5ed695]
src/main.d:448 _Dmain [0x5ec8de]

with patch

Using Config Dir: /home/alex/.config/onedrive-personal
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: 5368709120
Fetching details for OneDrive Root
OneDrive Root exists in the database
Initializing monitor ...
OneDrive monitor interval (seconds): 45
Monitor directory: .
WARNING: inotify_add_watch failed - permission denied: ./archive
Applying changes of Path ID: 66D53BE8A5056ECA!101
Uploading differences of .
Processing root
The directory has not changed
Uploading new items of .
OneDrive Client requested to create remote path: ./archive
The requested directory to create was not found on OneDrive - creating remote directory: ./archive
Successfully created the remote directory ./archive on OneDrive
Applying changes of Path ID: 66D53BE8A5056ECA!101
Applying changes of Path ID: 66D53BE8A5056ECA!101
Applying changes of Path ID: 66D53BE8A5056ECA!101
Applying changes of Path ID: 66D53BE8A5056ECA!101

@abraunegg abraunegg changed the title Handle a directory in the sync_dir when no permission to access Handle a directory in the sync_dir when no permission to access (Issue #532) Jun 14, 2019
* Log the error during sync rather that only in verbose mode
@abraunegg abraunegg requested a review from norbusan June 14, 2019 21:28
@abraunegg abraunegg added this to the v2.3.5 milestone Jun 14, 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.

Compiles, works as expected in my test cases, thanks

@abraunegg
Copy link
Owner Author

Thanks - will wait for @borouhin to confirm fix is working before merging.

@abraunegg abraunegg merged commit bbf35f1 into master Jun 14, 2019
@abraunegg abraunegg deleted the Issue-#532 branch June 14, 2019 23:23
@lock
Copy link

lock bot commented Jul 14, 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 Jul 14, 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.

2 participants