From 809ccde5627f9a2f2c08fb1e8906d4c12d34cd66 Mon Sep 17 00:00:00 2001 From: skilion Date: Sun, 28 May 2017 22:45:09 +0200 Subject: [PATCH] workaround for old OneDrive files --- src/sync.d | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/sync.d b/src/sync.d index 0cdd3a5c..5bdb2d17 100644 --- a/src/sync.d +++ b/src/sync.d @@ -47,7 +47,7 @@ private Item makeItem(const ref JSONValue jsonItem) name: jsonItem["name"].str, type: type, eTag: isItemRoot(jsonItem) ? null : jsonItem["eTag"].str, // eTag is not returned if for the root in OneDrive Biz - cTag: isItemFolder(jsonItem) ? null : jsonItem["cTag"].str, + cTag: /*isItemFolder(jsonItem)*/ "cTag" !in jsonItem ? null : jsonItem["cTag"].str, // 'cTag' is missing in old files mtime: SysTime.fromISOExtString(jsonItem["fileSystemInfo"]["lastModifiedDateTime"].str), parentId: isItemRoot(jsonItem) ? null : jsonItem["parentReference"]["id"].str }; @@ -65,7 +65,8 @@ private Item makeItem(const ref JSONValue jsonItem) log.vlog("The file does not have any hash"); } } else { - log.vlog("No hashes in the file facet"); + // 'hashes' is missing in old files + log.vlog("No hashes facet"); } }