diff --git a/src/builtins/path.cpp b/src/builtins/path.cpp index 4ddfbba96..5e09cbcfa 100644 --- a/src/builtins/path.cpp +++ b/src/builtins/path.cpp @@ -691,9 +691,7 @@ static int path_resolve(parser_t &parser, io_streams_t &streams, int argc, const real = normalize_path(*real, false); break; } - rest = wbasename(next); - rest += L'/'; - rest += rest; + rest = wbasename(next) + L'/' + rest; } if (!real) { continue;