Merge pull request #27 from astanin/fix-missing-ctag

fix #24: crash on sync if cTag is missing
This commit is contained in:
skilion 2016-02-11 22:41:29 +01:00
commit 5ed7dfcf3c

View file

@ -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;