mirror of
https://github.com/abraunegg/onedrive
synced 2024-05-20 22:56:36 +02:00
Update handling of folders that cannot be read if parent should be skipped (#866)
* If a directory cannot be accessed, and is in a folder that should be skipped, do not print warning
This commit is contained in:
parent
1c555c3180
commit
7ca1ff95a8
|
@ -151,8 +151,13 @@ final class Monitor
|
||||||
log.log("sudo sysctl fs.inotify.max_user_watches=524288");
|
log.log("sudo sysctl fs.inotify.max_user_watches=524288");
|
||||||
}
|
}
|
||||||
if (errno() == 13) {
|
if (errno() == 13) {
|
||||||
log.vlog("WARNING: inotify_add_watch failed - permission denied: ", pathname);
|
if ((selectiveSync.getSkipDotfiles()) && (selectiveSync.isDotFile(pathname))) {
|
||||||
return;
|
// no misleading output that we could not add a watch due to permission denied
|
||||||
|
return;
|
||||||
|
} else {
|
||||||
|
log.vlog("WARNING: inotify_add_watch failed - permission denied: ", pathname);
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
// Flag any other errors
|
// Flag any other errors
|
||||||
log.error("ERROR: inotify_add_watch failed: ", pathname);
|
log.error("ERROR: inotify_add_watch failed: ", pathname);
|
||||||
|
@ -166,11 +171,9 @@ final class Monitor
|
||||||
if (isDir(pathname)) {
|
if (isDir(pathname)) {
|
||||||
// This is a directory
|
// This is a directory
|
||||||
// is the path exluded if skip_dotfiles configured and path is a .folder?
|
// is the path exluded if skip_dotfiles configured and path is a .folder?
|
||||||
if (selectiveSync.getSkipDotfiles()) {
|
if ((selectiveSync.getSkipDotfiles()) && (selectiveSync.isDotFile(pathname))) {
|
||||||
if (selectiveSync.isDotFile(pathname)) {
|
// no misleading output that we are monitoring this directory
|
||||||
// no misleading output that we are monitoring this directory
|
return;
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
// Log that this is directory is being monitored
|
// Log that this is directory is being monitored
|
||||||
log.vlog("Monitor directory: ", pathname);
|
log.vlog("Monitor directory: ", pathname);
|
||||||
|
|
Loading…
Reference in a new issue