1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-07-04 07:11:47 +02:00

fix tests and minor changes

- use the iterator in `CanonPath` to count `level`
- use the `CanonPath::basename` method
- use `CanonPath::root` instead of `CanonPath{""}`
- remove `Path` and `PathView`, use `std::filesystem::path` directly
This commit is contained in:
siddhantCodes 2024-07-03 17:34:02 +05:30
parent 72bb530141
commit 2cf24a2df0
7 changed files with 21 additions and 13 deletions

View file

@ -290,11 +290,11 @@ void parseDump(FileSystemObjectSink & sink, Source & source)
}
if (version != narVersionMagic1)
throw badArchive("input doesn't look like a Nix archive");
parse(sink, source, CanonPath{""});
parse(sink, source, CanonPath::root);
}
void restorePath(const Path & path, Source & source)
void restorePath(const std::filesystem::path & path, Source & source)
{
RestoreSink sink;
sink.dstPath = path;