Fix potential error dragging attachment with missing file
This commit is contained in:
parent
fe9fc8bc5a
commit
9ea82bb6cd
1 changed files with 1 additions and 1 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Reference in a new issue