Update logging output to handle directory entries only (#1364)

* When in --monitor mode, avoid outputting misleading logging when the new or modified item is a file, not a directory
This commit is contained in:
abraunegg 2021-03-27 07:29:08 +11:00 committed by GitHub
parent fd04d632d6
commit 5c8083001a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -2915,7 +2915,12 @@ final class SyncEngine
}
// scan for changes in the path provided
log.log("Uploading differences of ", logPath);
if (isDir(path)) {
// if this path is a directory, output this message.
// if a file, potentially leads to confusion as to what the client is actually doing
log.log("Uploading differences of ", logPath);
}
Item item;
// For each unique OneDrive driveID we know about
foreach (driveId; driveIDsArray) {
@ -2935,7 +2940,13 @@ final class SyncEngine
}
}
log.log("Uploading new items of ", logPath);
// scan for changes in the path provided
if (isDir(path)) {
// if this path is a directory, output this message.
// if a file, potentially leads to confusion as to what the client is actually doing
log.log("Uploading new items of ", logPath);
}
// Filesystem walk to find new files not uploaded
uploadNewItems(path);
// clean up idsToDelete only if --dry-run is set