From 524a71cfe8578faca5e14574d86cd94cf976673d Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Mon, 1 Dec 2014 02:32:44 -0500 Subject: [PATCH] Fix sync error with missing base directory set Fixes #376 --- chrome/content/zotero/xpcom/attachments.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/chrome/content/zotero/xpcom/attachments.js b/chrome/content/zotero/xpcom/attachments.js index 2cb574c5ae..bed2454ecc 100644 --- a/chrome/content/zotero/xpcom/attachments.js +++ b/chrome/content/zotero/xpcom/attachments.js @@ -1046,6 +1046,11 @@ Zotero.Attachments = new function(){ return path; } + if (!baseDir.exists()) { + Zotero.debug("Base directory '" + baseDir.path + "' doesn't exist", 2); + return path; + } + // Get nsIFile for file var attachmentFile = Components.classes["@mozilla.org/file/local;1"] .createInstance(Components.interfaces.nsILocalFile);