about summary refs log tree commit diff
path: root/src/libstore
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2017-05-08T11·36+0200
committerEelco Dolstra <edolstra@gmail.com>2017-05-08T13·56+0200
commit7689181e4f5921d3356736996079ec0310e834c6 (patch)
tree0847e7ab7dd370d73f9589d1a500f536e079b025 /src/libstore
parent00b286275c1a77458e45bd73528c9ca729cca7f6 (diff)
Minor cleanup
Diffstat (limited to 'src/libstore')
-rw-r--r--src/libstore/store-api.cc24
1 files changed, 13 insertions, 11 deletions
diff --git a/src/libstore/store-api.cc b/src/libstore/store-api.cc
index b5a91e53672f..8405c66dd476 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);
         }
     }
 }