commit e95a919c12aa4acd8070c3229f74126d850a1df3 parent 3b1bc27c4c3dea26536c47376297634692168d0d Author: Dan Stillman <dstillman@zotero.org> Date: Sun, 14 Nov 2010 00:38:05 +0000 Display more helpful error message for nsIFile.remove() error Diffstat:
| M | chrome/content/zotero/xpcom/storage/zfs.js | | | 15 | ++++++++++++++- |
1 file changed, 14 insertions(+), 1 deletion(-)
diff --git a/chrome/content/zotero/xpcom/storage/zfs.js b/chrome/content/zotero/xpcom/storage/zfs.js @@ -237,7 +237,20 @@ Zotero.Sync.Storage.Session.ZFS.prototype.downloadFile = function (request) { } if (destFile.exists()) { - destFile.remove(false); + try { + destFile.remove(false); + } + catch (e) { + // TODO: localize + var msg = "Zotero was unable to delete a temporary file in " + + destFile.parent.path + " during syncing." + + "\n\n" + + "Restarting your computer or disabling anti-virus/security " + + "software may fix the problem."; + Zotero.debug(e, 1); + Components.utils.reportError(e); + self.onError(msg); + } } // saveURI() below appears not to create empty files for Content-Length: 0,