diff --git a/chrome/content/zotero/xpcom/dataDirectory.js b/chrome/content/zotero/xpcom/dataDirectory.js index 988bf2b3cd..7c8ad900ae 100644 --- a/chrome/content/zotero/xpcom/dataDirectory.js +++ b/chrome/content/zotero/xpcom/dataDirectory.js @@ -124,7 +124,7 @@ Zotero.DataDirectory = { } // For other custom directories that don't exist, show not-found dialog else { - Zotero.debug("Custom data directory ${file} not found", 1); + Zotero.debug(`Custom data directory ${file} not found`, 1); throw { name: "NS_ERROR_FILE_NOT_FOUND" }; } } @@ -264,7 +264,9 @@ Zotero.DataDirectory = { var fp = Components.classes["@mozilla.org/filepicker;1"] .createInstance(nsIFilePicker); fp.init(win, Zotero.getString('dataDir.selectDir'), nsIFilePicker.modeGetFolder); - fp.displayDirectory = Zotero.File.pathToFile(this.dir); + fp.displayDirectory = Zotero.File.pathToFile( + this._dir ? this._dir : OS.Path.dirname(this.defaultDir) + ); fp.appendFilters(nsIFilePicker.filterAll); if (fp.show() == nsIFilePicker.returnOK) { var file = fp.file; diff --git a/chrome/content/zotero/xpcom/zotero.js b/chrome/content/zotero/xpcom/zotero.js index ecfd230ba4..00b3ed7bb5 100644 --- a/chrome/content/zotero/xpcom/zotero.js +++ b/chrome/content/zotero/xpcom/zotero.js @@ -295,7 +295,7 @@ Services.scriptloader.loadSubScript("resource://zotero/polyfill.js"); _startupErrorHandler = function() { var ps = Components.classes["@mozilla.org/embedcomp/prompt-service;1"]. createInstance(Components.interfaces.nsIPromptService); - var buttonFlags = (ps.BUTTON_POS_0) * (ps.BUTTON_TITLE_OK) + var buttonFlags = (ps.BUTTON_POS_0) * (ps.BUTTON_TITLE_IS_STRING) + (ps.BUTTON_POS_1) * (ps.BUTTON_TITLE_IS_STRING) + (ps.BUTTON_POS_2) * (ps.BUTTON_TITLE_IS_STRING); // TEMP: lastDataDir can be removed once old persistent descriptors have been @@ -305,7 +305,8 @@ Services.scriptloader.loadSubScript("resource://zotero/polyfill.js"); Zotero.getString('general.error'), Zotero.startupError + '\n\n' + Zotero.getString('dataDir.previousDir') + ' ' + previousDir, - buttonFlags, null, + buttonFlags, + Zotero.getString('general.quit'), Zotero.getString('dataDir.useDefaultLocation'), Zotero.getString('general.locate'), null, {}); @@ -316,7 +317,7 @@ Services.scriptloader.loadSubScript("resource://zotero/polyfill.js"); } // Locate data directory else if (index == 2) { - Zotero.DataDirectory.choose(); + Zotero.DataDirectory.choose(true); } } return;