mirror of
https://github.com/abraunegg/onedrive
synced 2024-05-15 20:26:53 +02:00
fix #24: crash on sync if cTag is missing
According to https://dev.onedrive.com/resources/item.htm cTag property is not returned if the Item is a folder.
This commit is contained in:
parent
7e3d36750a
commit
b824f87e7e
10
src/sync.d
10
src/sync.d
|
@ -180,7 +180,15 @@ final class SyncEngine
|
|||
return;
|
||||
}
|
||||
|
||||
string cTag = item["cTag"].str;
|
||||
string cTag;
|
||||
try {
|
||||
cTag = item["cTag"].str;
|
||||
} catch (JSONException e) {
|
||||
// cTag is not returned if the Item is a folder
|
||||
// https://dev.onedrive.com/resources/item.htm
|
||||
cTag = "";
|
||||
}
|
||||
|
||||
string mtime = item["fileSystemInfo"]["lastModifiedDateTime"].str;
|
||||
|
||||
string crc32;
|
||||
|
|
Loading…
Reference in a new issue