From 7689181e4f5921d3356736996079ec0310e834c6 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Mon, 8 May 2017 13:36:23 +0200 Subject: [PATCH] Minor cleanup --- src/libstore/store-api.cc | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/src/libstore/store-api.cc b/src/libstore/store-api.cc index b5a91e536..8405c66dd 100644 --- a/src/libstore/store-api.cc +++ b/src/libstore/store-api.cc @@ -482,21 +482,23 @@ void Store::pathInfoToJSON(JSONPlaceholder & jsonOut, const PathSet & storePaths if (showClosureSize) jsonPath.attr("closureSize", getClosureSize(storePath)); - if (!includeImpureInfo) continue; + if (includeImpureInfo) { - if (info->deriver != "") - jsonPath.attr("deriver", info->deriver); + if (info->deriver != "") + jsonPath.attr("deriver", info->deriver); - if (info->registrationTime) - jsonPath.attr("registrationTime", info->registrationTime); + if (info->registrationTime) + jsonPath.attr("registrationTime", info->registrationTime); - if (info->ultimate) - jsonPath.attr("ultimate", info->ultimate); + if (info->ultimate) + jsonPath.attr("ultimate", info->ultimate); + + if (!info->sigs.empty()) { + auto jsonSigs = jsonPath.list("signatures"); + for (auto & sig : info->sigs) + jsonSigs.elem(sig); + } - if (!info->sigs.empty()) { - auto jsonSigs = jsonPath.list("signatures"); - for (auto & sig : info->sigs) - jsonSigs.elem(sig); } } }