Skip to content

Commit 0b4525c

Browse files
authored
js: Use string instead of regexp (#11845)
1 parent ce4dce5 commit 0b4525c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

js/misc/fileDialog.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ function _launchDialog(type, callback, params) {
1717
let args = ["cinnamon-file-dialog"];
1818
if (params.selectMultiple) type += 3; //add 3 to use the select-multiple version
1919
args.push(String(type));
20-
if (params.path) args.push("-p", params.path.replace(/~/, GLib.get_home_dir()));
20+
if (params.path) args.push("-p", params.path.replace("~", GLib.get_home_dir()));
2121
if (params.name) args.push("-n", params.name);
22-
if (params.directory) args.push("-d", params.directory.replace(/~/, GLib.get_home_dir()));
22+
if (params.directory) args.push("-d", params.directory.replace("~", GLib.get_home_dir()));
2323
if (params.filters) {
2424
let filterList = [];
2525
for (let i = 0; i < params.filters.length; i++) {

0 commit comments

Comments
 (0)