Skip to content

Commit

Permalink
path, bugfix: result error in path.resolve root test case.
Browse files Browse the repository at this point in the history
  • Loading branch information
xicilion committed Jun 24, 2019
1 parent 6e8e02c commit 83cc739
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion fibjs/include/path.h
Expand Up @@ -565,7 +565,14 @@ inline result_t _resolve(OptArgs ps, exlib::string& retVal)
p.resolvePosix(s);
}

return _normalize(p.str(), retVal, true);
result_t hr = _normalize(p.str(), retVal, true);
if (hr < 0)
return hr;

if (retVal.empty())
retVal = "/";

return 0;
}

inline result_t _resolve(exlib::string& path)
Expand Down

0 comments on commit 83cc739

Please sign in to comment.