Fix error copying attachment without path to another library
This commit is contained in:
parent
2dce15c35c
commit
ccc4dccffd
1 changed files with 1 additions and 1 deletions
|
@ -2905,7 +2905,7 @@ Zotero.defineProperty(Zotero.Item.prototype, 'attachmentPath', {
|
|||
}
|
||||
else if (linkMode == Zotero.Attachments.LINK_MODE_IMPORTED_URL ||
|
||||
linkMode == Zotero.Attachments.LINK_MODE_IMPORTED_FILE) {
|
||||
if (!val.startsWith('storage:')) {
|
||||
if (val && !val.startsWith('storage:')) {
|
||||
let storagePath = Zotero.Attachments.getStorageDirectory(this).path;
|
||||
if (!val.startsWith(storagePath)) {
|
||||
throw new Error("Imported file path must be within storage directory");
|
||||
|
|
Loading…
Reference in a new issue