Fix Bug #3165: Correct logging output for 'skip_file' exclusions (#3176)

* Correct logging output for 'skip_file' exclusions
This commit is contained in:
abraunegg 2025-03-25 06:55:41 +11:00 committed by GitHub
commit 737244e5c7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -2293,7 +2293,7 @@ class SyncEngine {
unwanted = selectiveSync.isFileNameExcluded(exclusionTestPath);
if (debugLogging) {addLogEntry("Result: " ~ to!string(unwanted), ["debug"]);}
if (unwanted) {
if (verboseLogging) {addLogEntry("Skipping file - excluded by skip_dir config: " ~ thisItemName, ["verbose"]);}
if (verboseLogging) {addLogEntry("Skipping file - excluded by skip_file config: " ~ thisItemName, ["verbose"]);}
}
} else {
// parent id is not in the database
@ -5165,7 +5165,7 @@ class SyncEngine {
// The path that needs to be checked needs to include the '/'
// This due to if the user has specified in skip_file an exclusive path: '/path/file' - that is what must be matched
if (selectiveSync.isFileNameExcluded(localFilePath.strip('.'))) {
if (verboseLogging) {addLogEntry("Skipping file - excluded by skip_dir config: " ~ localFilePath, ["verbose"]);}
if (verboseLogging) {addLogEntry("Skipping file - excluded by skip_file config: " ~ localFilePath, ["verbose"]);}
clientSideRuleExcludesPath = true;
}
}
@ -5460,7 +5460,7 @@ class SyncEngine {
if (clientSideRuleExcludesPath) {
// This path should be skipped
if (verboseLogging) {addLogEntry("Skipping file - excluded by skip_dir config: " ~ exclusionTestPath, ["verbose"]);}
if (verboseLogging) {addLogEntry("Skipping file - excluded by skip_file config: " ~ exclusionTestPath, ["verbose"]);}
}
}
}