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