From 0ec868b119b74dcbdc19bf599a85fc81a5b6e3a3 Mon Sep 17 00:00:00 2001 From: nightwing Date: Thu, 16 Apr 2015 02:18:31 +0400 Subject: [PATCH] normalize paths for home dir too --- plugins/c9.core/util.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/plugins/c9.core/util.js b/plugins/c9.core/util.js index 4e37bb0b..cec28160 100644 --- a/plugins/c9.core/util.js +++ b/plugins/c9.core/util.js @@ -277,8 +277,7 @@ define(function(require, exports, module) { var reHome = new RegExp("^" + plugin.escapeRegExp(c9.home || "/home/ubuntu")); plugin.normalizePath = function(path){ - if (!path || path.charAt(0) == "~") return path; - return normalize(path.replace(reHome, "~")); + return path && normalize(path.replace(reHome, "~")); }; /**