Display more helpful error message for nsIFile.remove() error

This commit is contained in:
Dan Stillman 2010-11-14 00:38:05 +00:00
parent 3b1bc27c4c
commit e95a919c12

View file

@ -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,