Skip to content

Commit

Permalink
chore(app/dialog): always append default file extension
Browse files Browse the repository at this point in the history
This ensures that the happy path (saving without changing the file type)
works on Linux.

Related to #1699
  • Loading branch information
nikku authored and barmac committed Feb 28, 2020
1 parent 3e57755 commit d581449
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions app/lib/dialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,13 @@ class Dialog {
// remove extension
name = path.parse(name).name;

// add default extension as specified by filter
// this prevents users on Linux to run into export / save-as issues,
// cf. https://github.com/camunda/camunda-modeler/issues/1699
if (filters && filters[0] && filters[0].extensions && filters[0].extensions[0]) {
name = name + '.' + filters[0].extensions[0];
}

let { defaultPath } = options;

if (!defaultPath) {
Expand Down

0 comments on commit d581449

Please sign in to comment.