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
This commit is contained in:
Eelco Dolstra 2018-10-16 23:39:36 +02:00
parent 79e358ce6d
commit bd78544f66

View file

@ -320,6 +320,8 @@ ref<const ValidPathInfo> Store::queryPathInfo(const Path & storePath)
void Store::queryPathInfo(const Path & storePath,
Callback<ref<ValidPathInfo>> callback)
{
assertStorePath(storePath);
auto hashPart = storePathToHash(storePath);
try {