mirror of
https://github.com/NixOS/nix
synced 2025-06-25 23:11:16 +02:00
Improve String Handling
This commit is contained in:
parent
0bc66e529f
commit
1885d579db
3 changed files with 10 additions and 7 deletions
|
@ -116,7 +116,11 @@ Path canonPath(PathView path, bool resolveSymlinks)
|
|||
}
|
||||
}
|
||||
|
||||
return s.empty() ? "/" : std::move(s);
|
||||
if (s.empty()) {
|
||||
s = "/";
|
||||
}
|
||||
|
||||
return s;
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue