From 59eb83fe34f60542aeb96386578ecac441e24c46 Mon Sep 17 00:00:00 2001 From: John Foerch Date: Thu, 9 Dec 2010 11:29:11 -0500 Subject: [PATCH] fix bug in previous two patches forgot to specify global flag in string replace. --- modules/env.js | 2 +- modules/utils.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/env.js b/modules/env.js index 707312f..d9204a9 100644 --- a/modules/env.js +++ b/modules/env.js @@ -49,7 +49,7 @@ function get_home_directory () { var home = getenv('HOME') || getenv('USERPROFILE') || getenv('HOMEDRIVE') + getenv('HOMEPATH'); - home = home.replace("/", "\\"); + home = home.replace("/", "\\", "g"); dir.initWithPath(home); } else dir.initWithPath(getenv('HOME')); diff --git a/modules/utils.js b/modules/utils.js index d8eb5ad..debb719 100644 --- a/modules/utils.js +++ b/modules/utils.js @@ -123,7 +123,7 @@ function make_file (path) { if (path == "~") return get_home_directory(); if (WINDOWS) - path = path.replace("/", "\\"); + path = path.replace("/", "\\", "g"); if ((POSIX && path.substring(0,2) == "~/") || (WINDOWS && path.substring(0,2) == "~\\")) { -- 2.11.4.GIT