aboutsummaryrefslogtreecommitdiff
path: root/src/libstore/store-api.cc
diff options
context:
space:
mode:
authorShea Levy <shea@shealevy.com>2014-02-07 15:29:32 -0500
committerShea Levy <shea@shealevy.com>2014-02-08 00:13:33 -0500
commit188f96500bc16891b22c684ad96122635667a8ff (patch)
treed8378702f4e2d3e0ae8cf59c973f5eb9d57d57d7 /src/libstore/store-api.cc
parent94884475947ca8c44dda51d83f3c1fbfeff5ccc0 (diff)
nix-store --serve: Don't fail if asked for info about non-valid path
Signed-off-by: Shea Levy <shea@shealevy.com>
Diffstat (limited to 'src/libstore/store-api.cc')
-rw-r--r--src/libstore/store-api.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/libstore/store-api.cc b/src/libstore/store-api.cc
index d4d53e9da..082c2c4d9 100644
--- a/src/libstore/store-api.cc
+++ b/src/libstore/store-api.cc
@@ -269,6 +269,8 @@ void StoreAPI::serve(Source & in, Sink & out, bool sign)
} else if (cmd == "info") {
// !!! Maybe we want a queryPathInfos?
foreach (PathSet::iterator, i, paths) {
+ if (!isValidPath(*i))
+ continue;
ValidPathInfo info = queryPathInfo(*i);
writeString(info.path, out);
writeString(info.deriver, out);