From efaaaadce26e989b835356783e6d8c50e02e5396 Mon Sep 17 00:00:00 2001 From: abraunegg Date: Fri, 8 Mar 2019 08:40:29 +1100 Subject: [PATCH] Rework function uploadCreateDir (#397) * Ensure that on query failure, default root and drive id is used --- src/sync.d | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/sync.d b/src/sync.d index c6fa57eb..c3260931 100644 --- a/src/sync.d +++ b/src/sync.d @@ -1467,7 +1467,7 @@ final class SyncEngine return; } } - + // configure the parent item data if (hasId(onedrivePathDetails) && hasParentReference(onedrivePathDetails)){ log.vdebug("Parent path found, configuring parent item"); @@ -1475,11 +1475,10 @@ final class SyncEngine parent.driveId = onedrivePathDetails["parentReference"]["driveId"].str; // Should give something like 12345abcde1234a1 } else { // OneDrive API query failed - log.error("\nERROR: Unable to query the following path due to OneDrive API regression: ", path); - log.error("ERROR: Refer to https://github.com/OneDrive/onedrive-api-docs/issues/976 for further details"); - log.error("WORKAROUND: Manually create the path above on OneDrive to workaround API issue\n"); - // return - return; + // Assume client defaults + log.vdebug("Parent path could not be queried, using OneDrive account defaults"); + parent.id = defaultRootId; // Should give something like 12345ABCDE1234A1!101 + parent.driveId = defaultDriveId; // Should give something like 12345abcde1234a1 } }