fix #26 - should resolve to absolute path unless / is the first character

This commit is contained in:
Craig Condon
2013-07-26 13:40:54 -07:00
parent c3c1ddaaf0
commit e8ea712a45
2 changed files with 4 additions and 3 deletions
+2 -1
View File
@@ -32,7 +32,8 @@ if(argv.h || argv.help) {
function toRelative(pt) {
return path.normalize(pt.replace(/^\./, process.cwd() + "/."));
if(pt.substr(0, 1) == "/") return pt;
return path.join(process.cwd(), pt);
}