1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2024-09-19 10:50:24 -04:00

Put 'names' in the right scope

This commit is contained in:
Eelco Dolstra 2024-09-12 15:29:54 +02:00
parent 4de9587e50
commit 69bf9947c7

View file

@ -173,8 +173,6 @@ static void parse(FileSystemObjectSink & sink, Source & source, const CanonPath
s = readString(source); s = readString(source);
if (s != "(") throw badArchive("expected open tag"); if (s != "(") throw badArchive("expected open tag");
std::map<Path, int, CaseInsensitiveCompare> names;
auto getString = [&]() { auto getString = [&]() {
checkInterrupt(); checkInterrupt();
return readString(source); return readString(source);
@ -215,6 +213,8 @@ static void parse(FileSystemObjectSink & sink, Source & source, const CanonPath
else if (t == "directory") { else if (t == "directory") {
sink.createDirectory(path); sink.createDirectory(path);
std::map<Path, int, CaseInsensitiveCompare> names;
std::string prevName; std::string prevName;
while (1) { while (1) {