Skip to content

Commit

Permalink
js: Use string instead of regexp
Browse files Browse the repository at this point in the history
  • Loading branch information
Connormiha committed Sep 4, 2023
1 parent b6744f1 commit 688cc61
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions js/misc/fileDialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ function _launchDialog(type, callback, params) {
let args = ["cinnamon-file-dialog"];
if (params.selectMultiple) type += 3; //add 3 to use the select-multiple version
args.push(String(type));
if (params.path) args.push("-p", params.path.replace(/~/, GLib.get_home_dir()));
if (params.path) args.push("-p", params.path.replace("~", GLib.get_home_dir()));
if (params.name) args.push("-n", params.name);
if (params.directory) args.push("-d", params.directory.replace(/~/, GLib.get_home_dir()));
if (params.directory) args.push("-d", params.directory.replace("~", GLib.get_home_dir()));
if (params.filters) {
let filterList = [];
for (let i = 0; i < params.filters.length; i++) {
Expand Down

0 comments on commit 688cc61

Please sign in to comment.