fixed bug where an item is incorrectly assumed to be a file

This commit is contained in:
skilion 2017-06-15 15:17:47 +02:00
parent 126f2719b8
commit 974be0884b

View file

@ -63,7 +63,7 @@ private Item makeItem(const ref JSONValue jsonItem)
};
// extract the file hash
if (type == ItemType.file) {
if (isItemFile(jsonItem)) {
if ("hashes" in jsonItem["file"]) {
if ("crc32Hash" in jsonItem["file"]["hashes"]) {
item.crc32Hash = jsonItem["file"]["hashes"]["crc32Hash"].str;