diff --git a/chrome/content/zotero/xpcom/dataDirectory.js b/chrome/content/zotero/xpcom/dataDirectory.js index ec6038f781..d080d22448 100644 --- a/chrome/content/zotero/xpcom/dataDirectory.js +++ b/chrome/content/zotero/xpcom/dataDirectory.js @@ -300,6 +300,9 @@ Zotero.DataDirectory = { // access the custom location in Firefox, use the Zotero profile, since // there's at least some chance it's right. Otherwise, throw an error. if (!useProfile) { + // The error message normally gets the path from the pref, but + // we got it from the prefs file, so include it here + e.dataDir = nsIFile.path; throw e; } } diff --git a/chrome/content/zotero/xpcom/zotero.js b/chrome/content/zotero/xpcom/zotero.js index 7057ddcb21..47ca034e35 100644 --- a/chrome/content/zotero/xpcom/zotero.js +++ b/chrome/content/zotero/xpcom/zotero.js @@ -313,7 +313,9 @@ Services.scriptloader.loadSubScript("resource://zotero/polyfill.js"); Zotero.logError(e); } - let previousDir = Zotero.Prefs.get('lastDataDir') || Zotero.Prefs.get('dataDir'); + let previousDir = Zotero.Prefs.get('lastDataDir') + || Zotero.Prefs.get('dataDir') + || e.dataDir; Zotero.startupError = foundInDefault ? Zotero.getString( 'dataDir.notFound.defaultFound', @@ -357,8 +359,10 @@ Services.scriptloader.loadSubScript("resource://zotero/polyfill.js"); else { let index = ps.confirmEx(null, Zotero.getString('general.error'), - Zotero.startupError + '\n\n' + - Zotero.getString('dataDir.previousDir') + ' ' + previousDir, + Zotero.startupError + + (previousDir + ? '\n\n' + Zotero.getString('dataDir.previousDir') + ' ' + previousDir + : ''), buttonFlags, Zotero.getString('general.quit'), Zotero.getString('dataDir.useDefaultLocation'),