diff --git a/chrome/content/zotero/xpcom/storage/storageLocal.js b/chrome/content/zotero/xpcom/storage/storageLocal.js index 1816ad697c..84be63517d 100644 --- a/chrome/content/zotero/xpcom/storage/storageLocal.js +++ b/chrome/content/zotero/xpcom/storage/storageLocal.js @@ -650,14 +650,14 @@ Zotero.Sync.Storage.Local = { if (!md5) { md5 = yield item.attachmentHash; } + + // Set the file mtime to the time from the server + yield OS.File.setDates(path, null, new Date(parseInt(mtime))); } catch (e) { Zotero.File.checkFileAccessError(e, path, 'update'); } - // Set the file mtime to the time from the server - yield OS.File.setDates(path, null, new Date(parseInt(mtime))); - item.attachmentSyncedModificationTime = mtime; item.attachmentSyncedHash = md5; item.attachmentSyncState = "in_sync";