www

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | Submodules | README | LICENSE

commit 0d1314770467c4d0e8a390de53c3524264a69ced
parent 85826ba2f136182285ffed395487ce4ec83ec71a
Author: Dan Stillman <dstillman@zotero.org>
Date:   Tue, 15 Dec 2009 09:07:07 +0000

Better debugging for data.syncModTime error, maybe


Diffstat:
Mchrome/content/zotero/xpcom/storage/webdav.js | 12++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/chrome/content/zotero/xpcom/storage/webdav.js b/chrome/content/zotero/xpcom/storage/webdav.js @@ -264,9 +264,11 @@ Zotero.Sync.Storage.Session.WebDAV.prototype._setStorageModificationTime = funct * @param {Zotero.Sync.Storage.Request} [request] */ Zotero.Sync.Storage.Session.WebDAV.prototype.downloadFile = function (request) { + var funcName = "Zotero.Sync.Storage.Session.WebDAV.downloadFile()"; + var item = Zotero.Sync.Storage.getItemFromRequestName(request.name); if (!item) { - throw ("Item '" + request.name + "' not found in Zotero.Sync.Storage.Session.WebDAV.downloadFile()"); + throw ("Item '" + request.name + "' not found in " + funcName); } var self = this; @@ -280,13 +282,19 @@ Zotero.Sync.Storage.Session.WebDAV.prototype.downloadFile = function (request) { } if (!mdate) { - Zotero.debug("Remote file not found for item " + item.key); + Zotero.debug("Remote file not found for item " + Zotero.Items.getLibraryKeyHash(item)); request.finish(); return; } try { var syncModTime = Zotero.Date.toUnixTimestamp(mdate); + if (!syncModTime) { + var msg = "Invalid mod date '" + mdate + "' for item " + + Zotero.Items.getLibraryKeyHash(item) + " in " + funcName; + Zotero.debug(msg, 1); + throw (msg); + } // Skip download if local file exists and matches mod time var file = item.getFile();