Skip to content

Commit

Permalink
Fix use of non-standard string.replace function flags argument
Browse files Browse the repository at this point in the history
https://bugzilla.mozilla.org/show_bug.cgi?id=1108382

This was causing relative file paths for launching KeePass.exe to not work on windows

Fixed #5
  • Loading branch information
dlech committed May 24, 2018
1 parent 6dc1cd3 commit cf9e73e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion xul-ext/modules/KF.js
Original file line number Diff line number Diff line change
Expand Up @@ -536,7 +536,7 @@ KeeFox.prototype = {

// If user has defined a relative URL, convert it to a format that is valid for use with setRelativeDescriptor
if (fileName.startsWith('.\\') || fileName.startsWith('..\\'))
fileName = fileName.replace('\\', '/', 'g');
fileName = fileName.replace(/\\/g, '/');
if (fileName.startsWith('./') || fileName.startsWith('../'))
{
if (fileName.startsWith('./'))
Expand Down
2 changes: 1 addition & 1 deletion xul-ext/modules/locales.js
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ Localisation.prototype = {
}

// return the key if it all went wrong
name = name.replace("_", " ", "g");
name = name.replace(/_/g, " ");
return name;
},

Expand Down

0 comments on commit cf9e73e

Please sign in to comment.