1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-11-16 07:22:43 +01:00

libutil: Throw if str("contents") not found

This was broken in 7aa3e7e3a5 (since 2.25).
This commit is contained in:
Samuel Connelly 2025-10-03 18:41:01 -04:00 committed by Sergei Zimmerman
parent 1e709554d5
commit 242f362567
No known key found for this signature in database
4 changed files with 52 additions and 2 deletions

View file

@ -187,8 +187,10 @@ static void parse(FileSystemObjectSink & sink, Source & source, const CanonPath
tag = getString();
}
if (tag == "contents")
parseContents(crf, source);
if (tag != "contents")
throw badArchive("expected tag 'contents', got '%s'", tag);
parseContents(crf, source);
expectTag(")");
});