Additional safeguard in Zotero.Attachments.getStorageDirectory()
This commit is contained in:
parent
b8599d0414
commit
ad14b44335
1 changed files with 3 additions and 0 deletions
|
@ -970,6 +970,9 @@ Zotero.Attachments = new function(){
|
||||||
if (!item) {
|
if (!item) {
|
||||||
throw ("Item " + itemID + " not found in Zotero.Attachments.getStorageDirectory()");
|
throw ("Item " + itemID + " not found in Zotero.Attachments.getStorageDirectory()");
|
||||||
}
|
}
|
||||||
|
if (!item.key) {
|
||||||
|
throw ("No item key in Zotero.Attachments.getStorageDirectory()");
|
||||||
|
}
|
||||||
var dir = Zotero.getStorageDirectory();
|
var dir = Zotero.getStorageDirectory();
|
||||||
dir.append(item.key);
|
dir.append(item.key);
|
||||||
return dir;
|
return dir;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue