mirror of
https://github.com/abraunegg/onedrive
synced 2024-06-03 06:22:18 +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,9 +151,14 @@ 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) {
|
||||||
|
if ((selectiveSync.getSkipDotfiles()) && (selectiveSync.isDotFile(pathname))) {
|
||||||
|
// 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);
|
log.vlog("WARNING: inotify_add_watch failed - permission denied: ", pathname);
|
||||||
return;
|
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);
|
||||||
return;
|
return;
|
||||||
|
@ -166,12 +171,10 @@ 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