From 8ffb70df8507352ff820948baabf414c4da18ebe Mon Sep 17 00:00:00 2001 From: Simon Kornblith Date: Wed, 28 Mar 2007 18:37:04 +0000 Subject: [PATCH] closes #596, Auto-append appropriate file extension when none specified in Save dialog (i think) --- chrome/content/zotero/fileInterface.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chrome/content/zotero/fileInterface.js b/chrome/content/zotero/fileInterface.js index db9241a93..4c17d8518 100644 --- a/chrome/content/zotero/fileInterface.js +++ b/chrome/content/zotero/fileInterface.js @@ -53,13 +53,13 @@ Zotero_File_Exporter.prototype.save = function() { var fp = Components.classes["@mozilla.org/filepicker;1"] .createInstance(nsIFilePicker); fp.init(window, Zotero.getString("fileInterface.export"), nsIFilePicker.modeSave); - fp.appendFilters(Components.interfaces.nsIFilePicker.filterAll); // set file name and extension if(io.selectedTranslator.displayOptions.exportFileData) { // if the result will be a folder, don't append any extension or use // filters fp.defaultString = this.name; + fp.appendFilters(Components.interfaces.nsIFilePicker.filterAll); } else { // if the result will be a file, append an extension and use filters fp.defaultString = this.name+"."+io.selectedTranslator.target;