diff --git a/common/content/io.js b/common/content/io.js index 02e17856..b87e1e6f 100644 --- a/common/content/io.js +++ b/common/content/io.js @@ -941,7 +941,8 @@ IO.expandPath = function (path, relative) path = expand(path); // expand ~ - if (!relative && (WINDOWS ? /^~(?:$|[\\\/])/ : /^~(?:$|\/)/).test(path)) + // Yuck. + if (!relative && RegExp("~(?:$|[/" + util.escapeRegex(IO.PATH_SEP) + "])").test(path)) { // Try $HOME first, on all systems let home = services.get("environment").get("HOME");