Another attachment error recovery improvement

This commit is contained in:
Dan Stillman 2006-12-05 16:57:12 +00:00
parent 023e755eb6
commit 9bc8d1356a

View File

@ -376,6 +376,20 @@ Zotero.Attachments = new function(){
}
catch (e) {
Zotero.DB.rollbackTransaction();
try {
// Clean up
if (itemID) {
var destDir = Zotero.getStorageDirectory();
destDir.append(itemID);
if (destDir.exists()) {
destDir.remove(true);
}
}
}
catch (e) {}
throw (e);
}
Zotero.Fulltext.indexDocument(document, itemID);