mirror of
https://github.com/abraunegg/onedrive
synced 2026-03-14 14:35:46 +01:00
Merge branch 'master' into fix-file-path-computation-for-skip-dir-eval
This commit is contained in:
commit
873fc494a5
2 changed files with 43 additions and 16 deletions
|
|
@ -42,12 +42,24 @@ class ClientSideFiltering {
|
|||
loadSyncList(appConfig.syncListFilePath);
|
||||
}
|
||||
|
||||
// Configure skip_dir, skip_file, skip-dir-strict-match & skip_dotfiles from config entries
|
||||
// Handle skip_dir configuration in config file
|
||||
if (debugLogging) {
|
||||
addLogEntry("Configuring skip_dir ...", ["debug"]);
|
||||
addLogEntry("skip_dir: " ~ to!string(appConfig.getValueString("skip_dir")), ["debug"]);
|
||||
if (debugLogging) {addLogEntry("Configuring skip_dir ...", ["debug"]);}
|
||||
|
||||
// Validate skip_dir entries to ensure that this does not contain an invalid configuration
|
||||
// Do not use a skip_dir entry of .* as this will prevent correct searching of local changes to process.
|
||||
foreach(entry; appConfig.getValueString("skip_dir").split("|")){
|
||||
if (entry == ".*") {
|
||||
// invalid entry element detected
|
||||
addLogEntry();
|
||||
addLogEntry("ERROR: Invalid skip_dir entry '.*' detected.");
|
||||
addLogEntry(" To exclude hidden directories (those starting with '.'), enable the 'skip_dotfiles' configuration option instead of using wildcard patterns.");
|
||||
addLogEntry();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// All skip_dir entries are valid
|
||||
if (debugLogging) {addLogEntry("skip_dir: " ~ appConfig.getValueString("skip_dir"), ["debug"]);}
|
||||
setDirMask(appConfig.getValueString("skip_dir"));
|
||||
|
||||
// Was --skip-dir-strict-match configured?
|
||||
|
|
@ -59,6 +71,26 @@ class ClientSideFiltering {
|
|||
setSkipDirStrictMatch();
|
||||
}
|
||||
|
||||
// Handle skip_file configuration in config file
|
||||
if (debugLogging) {addLogEntry("Configuring skip_file ...", ["debug"]);}
|
||||
|
||||
// Validate skip_file entries to ensure that this does not contain an invalid configuration
|
||||
// Do not use a skip_file entry of .* as this will prevent correct searching of local changes to process.
|
||||
foreach(entry; appConfig.getValueString("skip_file").split("|")){
|
||||
if (entry == ".*") {
|
||||
// invalid entry element detected
|
||||
addLogEntry();
|
||||
addLogEntry("ERROR: Invalid skip_file entry '.*' detected.");
|
||||
addLogEntry(" To exclude hidden files (those starting with '.'), enable the 'skip_dotfiles' configuration option instead of using wildcard patterns.");
|
||||
addLogEntry();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// All skip_file entries are valid
|
||||
if (debugLogging) {addLogEntry("skip_file: " ~ appConfig.getValueString("skip_file"), ["debug"]);}
|
||||
setFileMask(appConfig.getValueString("skip_file"));
|
||||
|
||||
// Was --skip-dot-files configured?
|
||||
if (debugLogging) {
|
||||
addLogEntry("Configuring skip_dotfiles ...", ["debug"]);
|
||||
|
|
@ -68,23 +100,6 @@ class ClientSideFiltering {
|
|||
setSkipDotfiles();
|
||||
}
|
||||
|
||||
// Handle skip_file configuration in config file
|
||||
if (debugLogging) {addLogEntry("Configuring skip_file ...", ["debug"]);}
|
||||
|
||||
// Validate skip_file to ensure that this does not contain an invalid configuration
|
||||
// Do not use a skip_file entry of .* as this will prevent correct searching of local changes to process.
|
||||
foreach(entry; appConfig.getValueString("skip_file").split("|")){
|
||||
if (entry == ".*") {
|
||||
// invalid entry element detected
|
||||
addLogEntry("ERROR: Invalid skip_file entry '.*' detected");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// All skip_file entries are valid
|
||||
if (debugLogging) {addLogEntry("skip_file: " ~ appConfig.getValueString("skip_file"), ["debug"]);}
|
||||
setFileMask(appConfig.getValueString("skip_file"));
|
||||
|
||||
// All configured OK
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
14
src/sync.d
14
src/sync.d
|
|
@ -3350,6 +3350,12 @@ class SyncEngine {
|
|||
addLogEntry("Creating|Updating a DB Tie Record for this Shared Folder from the online parental data: " ~ sharedFolderDatabaseTie.name, ["debug"]);
|
||||
addLogEntry("Shared Folder DB Tie Record data: " ~ to!string(sharedFolderDatabaseTie), ["debug"]);
|
||||
|
||||
// Is this a dry-run excercise?
|
||||
if (dryRun) {
|
||||
// We need to ensure we add this to our faked entries
|
||||
idsFaked ~= [sharedFolderDatabaseTie.driveId, sharedFolderDatabaseTie.id];
|
||||
}
|
||||
|
||||
// Save item
|
||||
itemDB.upsert(sharedFolderDatabaseTie);
|
||||
|
||||
|
|
@ -5138,6 +5144,12 @@ class SyncEngine {
|
|||
}
|
||||
}
|
||||
|
||||
// Debug logging of paths being checked
|
||||
if (debugLogging) {
|
||||
addLogEntry("Database item being checked: " ~ to!string(dbItem), ["debug"]);
|
||||
addLogEntry("Local Path being checked: " ~ localFilePath, ["debug"]);
|
||||
}
|
||||
|
||||
// Determine which action to take
|
||||
final switch (dbItem.type) {
|
||||
case ItemType.file:
|
||||
|
|
@ -5319,7 +5331,7 @@ class SyncEngine {
|
|||
logKey = generateAlphanumericString();
|
||||
displayFunctionProcessingStart(thisFunctionName, logKey);
|
||||
}
|
||||
|
||||
|
||||
// What is the source of this item data?
|
||||
string itemSource = "database";
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue