mirror of
https://github.com/abraunegg/onedrive
synced 2026-03-14 14:35:46 +01:00
Fix logging output and use of grandparent identifiers (#3377)
* Fix logging output and use of grandparent identifiers when using --dry-run
This commit is contained in:
parent
f686b315c9
commit
bbae43d310
1 changed files with 2 additions and 18 deletions
20
src/sync.d
20
src/sync.d
|
|
@ -5925,8 +5925,6 @@ class SyncEngine {
|
|||
// Debug output what the self-built path currently is
|
||||
if (debugLogging) {addLogEntry(" - selfBuiltPath currently calculated as: " ~ selfBuiltPath, ["debug"]);}
|
||||
|
||||
addLogEntry(" - selfBuiltPath currently calculated as: " ~ selfBuiltPath);
|
||||
|
||||
// Issue #2731
|
||||
// Get the remoteDriveId from JSON record
|
||||
string remoteDriveId = onedriveJSONItem["parentReference"]["driveId"].str;
|
||||
|
|
@ -5942,15 +5940,10 @@ class SyncEngine {
|
|||
// Query the database for the 'remote' folder details from the database
|
||||
if (debugLogging) {addLogEntry("Query database for this 'remoteDriveId' record: " ~ to!string(remoteDriveId), ["debug"]);}
|
||||
|
||||
addLogEntry("Query database for this 'remoteDriveId' record: " ~ to!string(remoteDriveId));
|
||||
|
||||
Item remoteItem;
|
||||
itemDB.selectByRemoteDriveId(remoteDriveId, remoteItem);
|
||||
if (debugLogging) {addLogEntry("Query returned result (itemDB.selectByRemoteDriveId): " ~ to!string(remoteItem), ["debug"]);}
|
||||
|
||||
addLogEntry("Query returned result (itemDB.selectByRemoteDriveId): " ~ to!string(remoteItem));
|
||||
|
||||
|
||||
// Shared Folders present a unique challenge to determine what path needs to be used, especially in a --resync scenario where there are near zero records available to use computeItemPath()
|
||||
// Update the path that will be used to check 'sync_list' with the 'name' of the remoteDriveId database record
|
||||
// Issue #3331
|
||||
|
|
@ -5958,18 +5951,9 @@ class SyncEngine {
|
|||
if (!selfBuiltPath.startsWith("/" ~ remoteItem.name ~ "/")) {
|
||||
selfBuiltPath = remoteItem.name ~ selfBuiltPath;
|
||||
if (debugLogging) {addLogEntry("selfBuiltPath after 'Shared Folder' DB details update = " ~ to!string(selfBuiltPath), ["debug"]);}
|
||||
|
||||
addLogEntry("selfBuiltPath after 'Shared Folder' DB details update = " ~ to!string(selfBuiltPath));
|
||||
|
||||
} else {
|
||||
if (debugLogging) {addLogEntry("Shared Folder name already present in path; no update needed to selfBuiltPath", ["debug"]);}
|
||||
|
||||
addLogEntry("Shared Folder name already present in path; no update needed to selfBuiltPath");
|
||||
|
||||
if (debugLogging) {addLogEntry("Shared Folder name already present in path; no update needed to selfBuiltPath", ["debug"]);}
|
||||
}
|
||||
|
||||
addLogEntry(" - selfBuiltPath final calculated as: " ~ selfBuiltPath);
|
||||
|
||||
}
|
||||
|
||||
// Issue #2740
|
||||
|
|
@ -6221,7 +6205,7 @@ class SyncEngine {
|
|||
// If this is --dry-run
|
||||
if (dryRun) {
|
||||
// we dont create the directory, but we need to track that we 'faked it'
|
||||
idsFaked ~= [onlinePathData["parentReference"]["driveId"].str, onlinePathData["parentReference"]["id"].str];
|
||||
idsFaked ~= [grandparentItemDriveId, grandparentItemParentId];
|
||||
}
|
||||
|
||||
// Does the parental path exist locally?
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue