mirror of
https://github.com/NixOS/nix
synced 2025-07-04 07:11:47 +02:00
use CanonPath
in fs-sink
and its derivatives
This commit is contained in:
parent
32e6cc64b5
commit
72bb530141
12 changed files with 73 additions and 79 deletions
|
@ -165,7 +165,7 @@ struct CaseInsensitiveCompare
|
|||
};
|
||||
|
||||
|
||||
static void parse(FileSystemObjectSink & sink, Source & source, const Path & path)
|
||||
static void parse(FileSystemObjectSink & sink, Source & source, const CanonPath & path)
|
||||
{
|
||||
std::string s;
|
||||
|
||||
|
@ -246,7 +246,7 @@ static void parse(FileSystemObjectSink & sink, Source & source, const Path & pat
|
|||
}
|
||||
} else if (s == "node") {
|
||||
if (name.empty()) throw badArchive("entry name missing");
|
||||
parse(sink, source, path + "/" + name);
|
||||
parse(sink, source, path / name);
|
||||
} else
|
||||
throw badArchive("unknown field " + s);
|
||||
}
|
||||
|
@ -290,7 +290,7 @@ void parseDump(FileSystemObjectSink & sink, Source & source)
|
|||
}
|
||||
if (version != narVersionMagic1)
|
||||
throw badArchive("input doesn't look like a Nix archive");
|
||||
parse(sink, source, "");
|
||||
parse(sink, source, CanonPath{""});
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue