Skip to content

Commit

Permalink
Merge pull request #700 from li-qiang/master
Browse files Browse the repository at this point in the history
Fix bug for windows path
  • Loading branch information
dxg committed Jan 25, 2016
2 parents acc5887 + 45dde7b commit c912271
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
6 changes: 3 additions & 3 deletions lib/Utilities.js
Original file line number Diff line number Diff line change
Expand Up @@ -282,9 +282,9 @@ exports.getRealPath = function (path_str, stack_index) {
} else if ((m = tmp.match(/^\s*at\s+.+\s+\((.+):\d+:\d+\)$/)) !== null) {
cwd = path.dirname(m[1]);
}

if (path_str[0] !== path.sep) {
path_str = cwd + "/" + path_str;
var pathIsAbsolute = path.isAbsolute || require('path-is-absolute');
if (!pathIsAbsolute(path_str)) {
path_str = path.join(cwd, path_str);
}
if (path_str.substr(-1) === path.sep) {
path_str += "index";
Expand Down
11 changes: 6 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,12 @@
},
"analyse" : false,
"dependencies": {
"enforce" : "0.1.6",
"sql-query" : "0.1.26",
"sql-ddl-sync" : "0.3.11",
"hat" : "0.0.3",
"lodash" : "2.4.1"
"enforce" : "0.1.6",
"sql-query" : "0.1.26",
"sql-ddl-sync" : "0.3.11",
"hat" : "0.0.3",
"lodash" : "2.4.1",
"path-is-absolute" : "1.0.0"
},
"devDependencies": {
"mysql" : "2.9.0",
Expand Down

0 comments on commit c912271

Please sign in to comment.