mirror of
https://github.com/zotero/zotero.git
synced 2026-10-08 03:08:19 +00:00
closes #596, Auto-append appropriate file extension when none specified in Save dialog (i think)
This commit is contained in:
parent
6f39031ed6
commit
8ffb70df85
1 changed files with 1 additions and 1 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue