1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-25 10:41:16 +02:00

Replace symlink_exists with pathExists

As it turns out the orignal implementation of symlink_exists cannot be
used in Nix because it did now std::filesystem::filesystem_error.
The new implementation fixes that but is now actually the same as
pathExists except for the path type.
This commit is contained in:
Jörg Thalheim 2025-05-01 11:43:37 +02:00
parent 143fb88ceb
commit 5b59be914d
6 changed files with 9 additions and 38 deletions

View file

@ -1969,9 +1969,10 @@ void DerivationBuilderImpl::runChild()
if (pathExists(path))
ss.push_back(path);
if (settings.caFile != "" && pathExists(settings.caFile)) {
if (settings.caFile != "") {
Path caFile = settings.caFile;
pathsInChroot.try_emplace("/etc/ssl/certs/ca-certificates.crt", canonPath(caFile, true), true);
if (pathExists(caFile))
pathsInChroot.try_emplace("/etc/ssl/certs/ca-certificates.crt", canonPath(caFile, true), true);
}
}