commit 33334d9c018cdba2f78729e548e46d8dd68c9471
parent 1fadf1150e260f1f7042b4c33eb321303f2f8b21
Author: Dan Stillman <dstillman@zotero.org>
Date: Tue, 21 Jul 2015 02:59:12 -0400
Fix excessive file sync mtime updates/checks, but for real this time
Diffstat:
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/chrome/content/zotero/xpcom/storage.js b/chrome/content/zotero/xpcom/storage.js
@@ -863,6 +863,7 @@ Zotero.Sync.Storage = new function () {
return;
}
+ var mtime = row.mtime;
//Zotero.debug("Stored mtime is " + row.mtime);
//Zotero.debug("File mtime is " + fmtime);
@@ -871,8 +872,8 @@ Zotero.Sync.Storage = new function () {
Zotero.debug("Remote mod time for item " + lk + " is " + itemModTimes[item.id]);
// Ignore attachments whose stored mod times haven't changed
- if (row.storageModTime == itemModTimes[item.id]) {
- Zotero.debug("Storage mod time (" + row.storageModTime + ") "
+ if (mtime == itemModTimes[item.id]) {
+ Zotero.debug("Storage mod time (" + mtime + ") "
+ "hasn't changed for item " + lk);
return;
}
@@ -882,8 +883,6 @@ Zotero.Sync.Storage = new function () {
updatedStates[item.id] = Zotero.Sync.Storage.SYNC_STATE_FORCE_DOWNLOAD;
}
- var mtime = row.mtime;
-
// If stored time matches file, it hasn't changed locally
if (mtime == fmtime) {
return;