diff --git a/src/libexpr/paths.cc b/src/libexpr/paths.cc index 474ea2d74..50d0d9895 100644 --- a/src/libexpr/paths.cc +++ b/src/libexpr/paths.cc @@ -1,5 +1,4 @@ #include "eval.hh" -#include "store-api.hh" namespace nix { diff --git a/src/libutil/union-source-accessor.cc b/src/libutil/union-source-accessor.cc index cf16f20fb..eec0850c2 100644 --- a/src/libutil/union-source-accessor.cc +++ b/src/libutil/union-source-accessor.cc @@ -16,7 +16,7 @@ struct UnionSourceAccessor : SourceAccessor { for (auto & accessor : accessors) { auto st = accessor->maybeLstat(path); - if (st && st->type == Type::tRegular) + if (st) return accessor->readFile(path); } throw FileNotFound("path '%s' does not exist", showPath(path)); @@ -37,7 +37,7 @@ struct UnionSourceAccessor : SourceAccessor DirEntries result; for (auto & accessor : accessors) { auto st = accessor->maybeLstat(path); - if (!st || st->type != Type::tDirectory) + if (!st) continue; for (auto & entry : accessor->readDirectory(path)) // Don't override entries from previous accessors. @@ -50,7 +50,7 @@ struct UnionSourceAccessor : SourceAccessor { for (auto & accessor : accessors) { auto st = accessor->maybeLstat(path); - if (st && st->type == Type::tSymlink) + if (st) return accessor->readLink(path); } throw FileNotFound("path '%s' does not exist", showPath(path));