mirror of
https://github.com/NixOS/nix
synced 2025-06-27 00:11:17 +02:00
parent
f9611c7ae4
commit
4260a22a55
2 changed files with 4 additions and 4 deletions
|
@ -97,10 +97,10 @@ void replaceEnv(std::map<std::string, std::string> newEnv)
|
|||
}
|
||||
|
||||
|
||||
Path absPath(Path path, Path dir)
|
||||
Path absPath(Path path, std::optional<Path> dir)
|
||||
{
|
||||
if (path[0] != '/') {
|
||||
if (dir == "") {
|
||||
if (!dir) {
|
||||
#ifdef __GNU__
|
||||
/* GNU (aka. GNU/Hurd) doesn't have any limitation on path
|
||||
lengths and doesn't define `PATH_MAX'. */
|
||||
|
@ -116,7 +116,7 @@ Path absPath(Path path, Path dir)
|
|||
free(buf);
|
||||
#endif
|
||||
}
|
||||
path = dir + "/" + path;
|
||||
path = *dir + "/" + path;
|
||||
}
|
||||
return canonPath(path);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue