Additional safeguard in Zotero.Attachments.getStorageDirectory()

This commit is contained in:
Dan Stillman 2009-05-21 15:23:50 +00:00
parent b8599d0414
commit ad14b44335

View file

@ -970,6 +970,9 @@ Zotero.Attachments = new function(){
if (!item) {
throw ("Item " + itemID + " not found in Zotero.Attachments.getStorageDirectory()");
}
if (!item.key) {
throw ("No item key in Zotero.Attachments.getStorageDirectory()");
}
var dir = Zotero.getStorageDirectory();
dir.append(item.key);
return dir;