1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-11-09 12:06:01 +01:00

Improve String Handling

This commit is contained in:
Jacek Galowicz 2023-11-02 15:49:22 +01:00
parent 0bc66e529f
commit 1885d579db
3 changed files with 10 additions and 7 deletions

View file

@ -116,7 +116,11 @@ Path canonPath(PathView path, bool resolveSymlinks)
}
}
return s.empty() ? "/" : std::move(s);
if (s.empty()) {
s = "/";
}
return s;
}