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:
parent
143fb88ceb
commit
5b59be914d
6 changed files with 9 additions and 38 deletions
|
@ -533,7 +533,7 @@ struct GitInputScheme : InputScheme
|
|||
static MakeNotAllowedError makeNotAllowedError(std::filesystem::path repoPath)
|
||||
{
|
||||
return [repoPath{std::move(repoPath)}](const CanonPath & path) -> RestrictedPathError {
|
||||
if (fs::symlink_exists(repoPath / path.rel()))
|
||||
if (pathExists(repoPath / path.rel()))
|
||||
return RestrictedPathError(
|
||||
"Path '%1%' in the repository %2% is not tracked by Git.\n"
|
||||
"\n"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue