diff --git a/src/libfetchers/git.cc b/src/libfetchers/git.cc index 4cc726076..71bb8c0b7 100644 --- a/src/libfetchers/git.cc +++ b/src/libfetchers/git.cc @@ -535,7 +535,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"