From 9bc8d1356a5128fe9e96454529d8eea6395aeb73 Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Tue, 5 Dec 2006 16:57:12 +0000 Subject: [PATCH] Another attachment error recovery improvement --- chrome/content/zotero/xpcom/attachments.js | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/chrome/content/zotero/xpcom/attachments.js b/chrome/content/zotero/xpcom/attachments.js index dd7b5afcc3..2727766708 100644 --- a/chrome/content/zotero/xpcom/attachments.js +++ b/chrome/content/zotero/xpcom/attachments.js @@ -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);