mirror of
https://github.com/zotero/zotero.git
synced 2026-10-09 03:18:01 +00:00
Another attachment error recovery improvement
This commit is contained in:
parent
023e755eb6
commit
9bc8d1356a
1 changed files with 14 additions and 0 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue