We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0e52836 commit 773e7c6Copy full SHA for 773e7c6
src/path.cc
@@ -266,11 +266,11 @@ std::string PathResolve(Environment* env,
266
for (int i = numArgs - 1; i >= -1 && !resolvedAbsolute; i--) {
267
const std::string& path = (i >= 0) ? std::string(paths[i]) : cwd;
268
269
- if (static_cast<size_t>(i) == numArgs - 1 && path.back() == '/') {
270
- slashCheck = true;
271
- }
272
-
273
if (!path.empty()) {
+ if (static_cast<size_t>(i) == numArgs - 1 && path.back() == '/') {
+ slashCheck = true;
+ }
+
274
resolvedPath = std::string(path) + "/" + resolvedPath;
275
276
if (path.front() == '/') {
0 commit comments