1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-28 09:31:16 +02:00

Use SourcePath in more places

Now that SourcePath uses a SourceAccessor instead of an InputAccessor,
we can use it in function signatures instead of passing a
SourceAccessor and CanonPath separately.
This commit is contained in:
Eelco Dolstra 2024-05-06 19:05:42 +02:00
parent 2926ef0e90
commit eab2919119
25 changed files with 101 additions and 109 deletions

View file

@ -8,6 +8,7 @@
#include "archive.hh"
#include "config.hh"
#include "posix-source-accessor.hh"
#include "source-path.hh"
#include "file-system.hh"
#include "signals.hh"
@ -110,9 +111,9 @@ void SourceAccessor::dumpPath(
time_t dumpPathAndGetMtime(const Path & path, Sink & sink, PathFilter & filter)
{
auto [accessor, canonPath] = PosixSourceAccessor::createAtRoot(path);
accessor.dumpPath(canonPath, sink, filter);
return accessor.mtime;
auto path2 = PosixSourceAccessor::createAtRoot(path);
path2.dumpPath(sink, filter);
return path2.accessor.dynamic_pointer_cast<PosixSourceAccessor>()->mtime;
}
void dumpPath(const Path & path, Sink & sink, PathFilter & filter)