mirror of
https://github.com/NixOS/nix.git
synced 2024-11-25 16:23:02 +00:00
NAR parser: Fix check for duplicate / incorrectly sorted entries
"prevName" was always empty because it was declared in the wrong scope.
This commit is contained in:
parent
668d63d8dd
commit
495d32e1b8
@ -214,11 +214,13 @@ static void parse(FileSystemObjectSink & sink, Source & source, const CanonPath
|
|||||||
else if (t == "directory") {
|
else if (t == "directory") {
|
||||||
sink.createDirectory(path);
|
sink.createDirectory(path);
|
||||||
|
|
||||||
|
std::string prevName;
|
||||||
|
|
||||||
while (1) {
|
while (1) {
|
||||||
s = getString();
|
s = getString();
|
||||||
|
|
||||||
if (s == "entry") {
|
if (s == "entry") {
|
||||||
std::string name, prevName;
|
std::string name;
|
||||||
|
|
||||||
s = getString();
|
s = getString();
|
||||||
if (s != "(") throw badArchive("expected open tag");
|
if (s != "(") throw badArchive("expected open tag");
|
||||||
|
Loading…
Reference in New Issue
Block a user