From bd78544f66a001f00623d3d0e9d50b019ada6a9a Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Tue, 16 Oct 2018 23:39:36 +0200 Subject: [PATCH] Fix assertion failure in Store::queryPathInfo() $ nix-store -qR /nix/store/fnord nix-store: src/libstore/store-api.cc:80: std::__cxx11::string nix::storePathToHash(const Path&): Assertion `base.size() >= storePathHashLen' failed. Aborted --- src/libstore/store-api.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/libstore/store-api.cc b/src/libstore/store-api.cc index 2c0f68651..92e2685f7 100644 --- a/src/libstore/store-api.cc +++ b/src/libstore/store-api.cc @@ -320,6 +320,8 @@ ref Store::queryPathInfo(const Path & storePath) void Store::queryPathInfo(const Path & storePath, Callback> callback) { + assertStorePath(storePath); + auto hashPart = storePathToHash(storePath); try {