From 91d824b4a60747bfff7afc9bd9063034a27a7014 Mon Sep 17 00:00:00 2001 From: Kris Maglione Date: Wed, 24 Dec 2008 14:21:20 -0500 Subject: [PATCH] Fix io.js --- common/content/io.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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");