www

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | Submodules | README | LICENSE

commit 9ea82bb6cd4c15082614e84a1090556da43b4b3b
parent fe9fc8bc5a4a34eb45855ff62451422f51022629
Author: Dan Stillman <dstillman@zotero.org>
Date:   Fri,  3 Mar 2017 16:39:37 -0500

Fix potential error dragging attachment with missing file

Diffstat:
Mchrome/content/zotero/xpcom/attachments.js | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/chrome/content/zotero/xpcom/attachments.js b/chrome/content/zotero/xpcom/attachments.js @@ -1092,7 +1092,7 @@ Zotero.Attachments = new function(){ yield newAttachment.save(); // Copy over files if they exist - if (newAttachment.isImportedAttachment() && attachment.getFile()) { + if (newAttachment.isImportedAttachment() && (yield attachment.fileExists())) { let dir = Zotero.Attachments.getStorageDirectory(attachment); let newDir = yield Zotero.Attachments.createDirectoryForItem(newAttachment); yield Zotero.File.copyDirectory(dir, newDir);