mirror of
https://github.com/abraunegg/onedrive
synced 2026-03-14 14:35:46 +01:00
Merge branch 'master' into fix-issue-3501
This commit is contained in:
commit
b3d5759211
1 changed files with 12 additions and 2 deletions
14
src/sync.d
14
src/sync.d
|
|
@ -6142,8 +6142,18 @@ class SyncEngine {
|
|||
|
||||
// So that this path is in the DB, we need to add onedriveJSONItem to the DB so that this record can be used to build paths if required
|
||||
if (parentInDatabase) {
|
||||
// Save this JSON now
|
||||
saveItem(onedriveJSONItem);
|
||||
// Parent is in DB .. is this a 'new' object or an 'existing' object?
|
||||
// Issue #3501 - If an online name name is done, the item needs to be 'renamed' via applyPotentiallyChangedItem() later
|
||||
// Only save to the database at this point, if this JSON 'id' is not already in the database to allow applyPotentiallyChangedItem() to operate as expected
|
||||
Item tempDBItem;
|
||||
itemDB.selectById(onedriveJSONItem["parentReference"]["driveId"].str, onedriveJSONItem["id"].str, tempDBItem);
|
||||
|
||||
// Was a valid DB response returned
|
||||
if (tempDBItem.driveId.empty) {
|
||||
// No .. so this is a new item
|
||||
// Save this JSON now
|
||||
saveItem(onedriveJSONItem);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue