Skip to content

Commit b1bb492

Browse files
committed
Fix bug for windows path
1 parent acc5887 commit b1bb492

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/Utilities.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -283,8 +283,8 @@ exports.getRealPath = function (path_str, stack_index) {
283283
cwd = path.dirname(m[1]);
284284
}
285285

286-
if (path_str[0] !== path.sep) {
287-
path_str = cwd + "/" + path_str;
286+
if (!path.isAbsolute(path_str)) {
287+
path_str = path.join(cwd, path_str);
288288
}
289289
if (path_str.substr(-1) === path.sep) {
290290
path_str += "index";

0 commit comments

Comments
 (0)