From 6cefc8fb729d27e43d42800dac196c0ed21a1ee2 Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Fri, 8 Jan 2010 06:52:13 +0000 Subject: [PATCH] Add error message with filename when file creation fails during sync --- chrome/content/zotero/xpcom/storage.js | 9 +++++++-- chrome/locale/en-US/zotero/zotero.properties | 1 + 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/chrome/content/zotero/xpcom/storage.js b/chrome/content/zotero/xpcom/storage.js index 07ae2fed9..33dedecd7 100644 --- a/chrome/content/zotero/xpcom/storage.js +++ b/chrome/content/zotero/xpcom/storage.js @@ -902,7 +902,9 @@ Zotero.Sync.Storage = new function () { renamed = true; } else { - throw(e); + Components.utils.reportError(e); + var msg = Zotero.getString('sync.storage.error.fileNotCreated', parentDir.leafName + '/' + fileName); + throw(msg); } } @@ -1099,7 +1101,10 @@ Zotero.Sync.Storage = new function () { } else { zipReader.close(); - throw(e); + + Components.utils.reportError(e); + var msg = Zotero.getString('sync.storage.error.fileNotCreated', parentDir.leafName + '/' + fileName); + throw(msg); } } zipReader.extract(entryName, destFile); diff --git a/chrome/locale/en-US/zotero/zotero.properties b/chrome/locale/en-US/zotero/zotero.properties index e1e5ca843..bfb4e4392 100644 --- a/chrome/locale/en-US/zotero/zotero.properties +++ b/chrome/locale/en-US/zotero/zotero.properties @@ -624,6 +624,7 @@ sync.storage.error.permissionDeniedAtAddress = You do not have permission to cre sync.storage.error.checkFileSyncSettings = Please check your file sync settings or contact your server administrator. sync.storage.error.verificationFailed = %S verification failed. Verify your file sync settings in the Sync pane of the Zotero preferences. sync.storage.error.fileInUse = The file '%S' is in use and cannot be updated. Please close the file or restart your computer and try syncing again. +sync.storage.error.fileNotCreated = The file '%S' could not be created in the Zotero 'storage' directory. sync.storage.error.fileEditingAccessLost = You no longer have file editing access to the Zotero group '%S', and files you've added or edited cannot be synced to the server. sync.storage.error.copyChangedItems = If you would like a chance to copy changed items and files elsewhere, cancel the sync now. sync.storage.error.fileUploadFailed = File upload failed.