Skip to content

Commit

Permalink
Update sync.d
Browse files Browse the repository at this point in the history
* Update PR based on Personal Account testing
  • Loading branch information
abraunegg committed Dec 23, 2024
1 parent f64e2d9 commit d323e46
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion src/sync.d
Original file line number Diff line number Diff line change
Expand Up @@ -2485,7 +2485,7 @@ class SyncEngine {
}


// Personal Account Shared Folder Handling
// Ensure 'parentId' is not empty, except for Personal Accounts
if (appConfig.accountType != "personal") {
// Is sharedFolderDatabaseTie.parentId.empty?
if (sharedFolderDatabaseTie.parentId.empty) {
Expand All @@ -2509,6 +2509,16 @@ class SyncEngine {
sharedFolderDatabaseTie.type = ItemType.root;
}

// Personal Account Shared Folder Handling
if (appConfig.accountType == "personal") {
// Yes this is a personal account
if (debugLogging) {
addLogEntry("Updating Shared Folder DB Tie record entry with correct values as this is a 'root' object as it is a Personal Shared Folder Root Object" , ["debug"]);
addLogEntry(" sharedFolderDatabaseTie.type = ItemType.root", ["debug"]);
}
sharedFolderDatabaseTie.type = ItemType.root;
}

// Log action
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"]);
Expand Down Expand Up @@ -9636,6 +9646,7 @@ class SyncEngine {
if (appConfig.accountType == "personal") {
// Set tieDBItem.parentId to null
tieDBItem.parentId = null;
tieDBItem.type = ItemType.root;
} else {
// The tieDBItem.parentId needs to be the correct driveId id reference
// Query the DB
Expand Down

0 comments on commit d323e46

Please sign in to comment.