diff --git a/src/libfetchers/git.cc b/src/libfetchers/git.cc index 3db603d32..4a916929e 100644 --- a/src/libfetchers/git.cc +++ b/src/libfetchers/git.cc @@ -533,7 +533,7 @@ struct GitInputScheme : InputScheme static MakeNotAllowedError makeNotAllowedError(std::filesystem::path repoPath) { return [repoPath{std::move(repoPath)}](const CanonPath & path) -> RestrictedPathError { - if (nix::pathExists(repoPath / path.rel())) + if (fs::symlink_exists(repoPath / path.rel())) return RestrictedPathError( "Path '%1%' in the repository %2% is not tracked by Git.\n" "\n"