mirror of
https://github.com/abraunegg/onedrive
synced 2024-05-22 23:52:13 +02:00
Fix support for '/*' regardless of location within sync_list file (#1293)
* Fix support for '/*' regardless of location within sync_list file
This commit is contained in:
parent
5837042a26
commit
1078795d6f
|
@ -223,7 +223,9 @@ private bool isPathExcluded(string path, string[] allowedPaths)
|
||||||
// if there are no allowed paths always return false
|
// if there are no allowed paths always return false
|
||||||
if (allowedPaths.empty) return false;
|
if (allowedPaths.empty) return false;
|
||||||
path = buildNormalizedPath(path);
|
path = buildNormalizedPath(path);
|
||||||
log.vdebug("Evaluation against 'sync_list' for: ", path);
|
log.vdebug("Evaluation against 'sync_list' for this path: ", path);
|
||||||
|
log.vdebug("[S]exclude = ", exclude);
|
||||||
|
log.vdebug("[S]excludeMatched = ", excludeMatched);
|
||||||
|
|
||||||
// unless path is an exact match, entire sync_list entries need to be processed to ensure
|
// unless path is an exact match, entire sync_list entries need to be processed to ensure
|
||||||
// negative matches are also correctly detected
|
// negative matches are also correctly detected
|
||||||
|
@ -294,6 +296,8 @@ private bool isPathExcluded(string path, string[] allowedPaths)
|
||||||
if (!exclude) {
|
if (!exclude) {
|
||||||
log.vdebug("Evaluation against 'sync_list' result: parental path match");
|
log.vdebug("Evaluation against 'sync_list' result: parental path match");
|
||||||
finalResult = false;
|
finalResult = false;
|
||||||
|
// parental path matches, break and go sync
|
||||||
|
break;
|
||||||
} else {
|
} else {
|
||||||
log.vdebug("Evaluation against 'sync_list' result: parental path match but must be excluded");
|
log.vdebug("Evaluation against 'sync_list' result: parental path match but must be excluded");
|
||||||
finalResult = true;
|
finalResult = true;
|
||||||
|
@ -317,10 +321,15 @@ private bool isPathExcluded(string path, string[] allowedPaths)
|
||||||
} else {
|
} else {
|
||||||
log.vdebug("Evaluation against 'sync_list' result: wildcard pattern matched but must be excluded");
|
log.vdebug("Evaluation against 'sync_list' result: wildcard pattern matched but must be excluded");
|
||||||
finalResult = true;
|
finalResult = true;
|
||||||
|
excludeMatched = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// Interim results
|
||||||
|
log.vdebug("[F]exclude = ", exclude);
|
||||||
|
log.vdebug("[F]excludeMatched = ", excludeMatched);
|
||||||
|
|
||||||
// results
|
// results
|
||||||
if (finalResult) {
|
if (finalResult) {
|
||||||
log.vdebug("Evaluation against 'sync_list' final result: EXCLUDED");
|
log.vdebug("Evaluation against 'sync_list' final result: EXCLUDED");
|
||||||
|
|
Loading…
Reference in a new issue