1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-25 23:11:16 +02: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;
}