www

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

commit 706583fa4baf438d7281880ba215c6e40a4d3442
parent 020553607df1f2d0375f8292b94e2d676b79703f
Author: Dan Stillman <dstillman@zotero.org>
Date:   Wed, 16 Sep 2009 11:29:49 +0000

Log but don't throw an error if a synced file is missing after extracting a ZIP file -- this can happen if a filename is changed and synced elsewhere but the renamed file wasn't synced, so the ZIP doesn't ontain a file with the known name


Diffstat:
Mchrome/content/zotero/xpcom/storage.js | 8+++++++-
1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/chrome/content/zotero/xpcom/storage.js b/chrome/content/zotero/xpcom/storage.js @@ -575,7 +575,13 @@ Zotero.Sync.Storage = new function () { var file = item.getFile(); if (!file) { - throw ("File not found for item " + item.id + " after processing download in " + funcName); + // This can happen if an HTML snapshot filename was changed and synced + // elsewhere but the renamed file wasn't synced, so the ZIP doesn't + // contain a file with the known name + var missingFile = item.getFile(null, true); + Components.utils.reportError("File '" + missingFile.leafName + "' not found after processing download " + + item.libraryID + "/" + item.key + " in " + funcName); + return; } file.lastModifiedTime = syncModTime * 1000;