Change order of Microsoft OneDrive restrictions and limitations check and skip_file|skip_dir (#2238)

* Perform check against Microsoft OneDrive restriction and limitations after user configured items to skip has been performed
This commit is contained in:
abraunegg 2022-11-26 05:42:38 +11:00 committed by GitHub
parent 87003c5923
commit 0b89a1fea0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 9 additions and 10 deletions

View File

@ -3603,7 +3603,6 @@ final class SyncEngine
return;
}
}
// Is the path excluded?
unwanted = selectiveSync.isDirNameExcluded(item.name);
}
@ -3630,7 +3629,7 @@ final class SyncEngine
return;
}
// Restriction and limitations about windows naming files
// Check against Microsoft OneDrive restriction and limitations about Windows naming files
if (!isValidName(path)) {
log.logAndNotify("Skipping item - invalid name (Microsoft Naming Convention): ", path);
return;
@ -4342,12 +4341,6 @@ final class SyncEngine
}
}
// Restriction and limitations about windows naming files
if (!isValidName(path)) {
log.logAndNotify("Skipping item - invalid name (Microsoft Naming Convention): ", path);
return;
}
// Check for bad whitespace items
if (!containsBadWhiteSpace(path)) {
log.logAndNotify("Skipping item - invalid name (Contains an invalid whitespace item): ", path);
@ -4360,7 +4353,7 @@ final class SyncEngine
return;
}
// filter out user configured items to skip
// Is this item excluded by user configuration of skip_dir or skip_file?
if (path != ".") {
if (isDir(path)) {
log.vdebug("Checking local path: ", path);
@ -4421,6 +4414,12 @@ final class SyncEngine
}
}
}
// Check against Microsoft OneDrive restriction and limitations about Windows naming files
if (!isValidName(path)) {
log.logAndNotify("Skipping item - invalid name (Microsoft Naming Convention): ", path);
return;
}
// We want to upload this new item
if (isDir(path)) {
@ -5979,7 +5978,7 @@ final class SyncEngine
}
}
// Restriction and limitations about windows naming files
// Check against Microsoft OneDrive restriction and limitations about Windows naming files
if (!isValidName(to)) {
log.logAndNotify("Skipping item - invalid name (Microsoft Naming Convention): ", to);
return;