aboutsummaryrefslogtreecommitdiff
path: root/src/libstore
diff options
context:
space:
mode:
authorJohn Ericson <John.Ericson@Obsidian.Systems>2020-07-02 21:44:18 +0000
committerJohn Ericson <John.Ericson@Obsidian.Systems>2020-07-02 21:46:10 +0000
commit1be279af2622b196cc4630c48254adc96071c7e9 (patch)
tree4c2d1a3568e11b5fa9e4631c80e79d46cf919049 /src/libstore
parent987a4a0be9978e568d736801f281791e54928ca3 (diff)
Fix Narinfo corruption detection bug
The aim of this check was just to ensure each key occurs once.
Diffstat (limited to 'src/libstore')
-rw-r--r--src/libstore/nar-info.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libstore/nar-info.cc b/src/libstore/nar-info.cc
index c403d4bec..ca471463c 100644
--- a/src/libstore/nar-info.cc
+++ b/src/libstore/nar-info.cc
@@ -66,7 +66,7 @@ NarInfo::NarInfo(const Store & store, const std::string & s, const std::string &
else if (name == "Sig")
sigs.insert(value);
else if (name == "CA") {
- if (!value.empty()) throw corrupt();
+ if (ca) throw corrupt();
// FIXME: allow blank ca or require skipping field?
ca = parseContentAddressOpt(value);
}