From e282a5643f86047e57272d09a3382c8af5ae458f Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Tue, 27 Dec 2016 03:11:21 -0500 Subject: [PATCH] Fix dragging external files onto library root --- chrome/content/zotero/xpcom/attachments.js | 2 +- .../zotero/xpcom/collectionTreeView.js | 108 +++++++++--------- 2 files changed, 52 insertions(+), 58 deletions(-) diff --git a/chrome/content/zotero/xpcom/attachments.js b/chrome/content/zotero/xpcom/attachments.js index 63c34f03b4..ed6ef6a37b 100644 --- a/chrome/content/zotero/xpcom/attachments.js +++ b/chrome/content/zotero/xpcom/attachments.js @@ -60,7 +60,7 @@ Zotero.Attachments = new function(){ throw new Error("parentItemID and collections cannot both be provided"); } - var attachmentItem, itemID, newFile, contentType; + var attachmentItem, itemID, newFile, contentType, destDir; try { yield Zotero.DB.executeTransaction(function* () { // Create a new attachment diff --git a/chrome/content/zotero/xpcom/collectionTreeView.js b/chrome/content/zotero/xpcom/collectionTreeView.js index cca1fd587c..947f09f4c7 100644 --- a/chrome/content/zotero/xpcom/collectionTreeView.js +++ b/chrome/content/zotero/xpcom/collectionTreeView.js @@ -2227,72 +2227,66 @@ Zotero.CollectionTreeView.prototype.drop = Zotero.Promise.coroutine(function* (r var parentCollectionID = false; } - var commitNotifier = Zotero.Notifier.begin(); - try { - for (var i=0; i