diff options
Diffstat (limited to 'src/nix/verify.cc')
-rw-r--r-- | src/nix/verify.cc | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/nix/verify.cc b/src/nix/verify.cc index d1aba08e3..ce90b0f6d 100644 --- a/src/nix/verify.cc +++ b/src/nix/verify.cc @@ -77,17 +77,20 @@ struct CmdVerify : StorePathsCommand try { checkInterrupt(); - Activity act2(*logger, lvlInfo, actUnknown, fmt("checking '%s'", storePath)); - MaintainCount<std::atomic<size_t>> mcActive(active); update(); auto info = store->queryPathInfo(store->parseStorePath(storePath)); + // Note: info->path can be different from storePath + // for binary cache stores when using --all (since we + // can't enumerate names efficiently). + Activity act2(*logger, lvlInfo, actUnknown, fmt("checking '%s'", store->printStorePath(info->path))); + if (!noContents) { std::unique_ptr<AbstractHashSink> hashSink; - if (info->ca == "") + if (!info->ca) hashSink = std::make_unique<HashSink>(*info->narHash.type); else hashSink = std::make_unique<HashModuloSink>(*info->narHash.type, std::string(info->path.hashPart())); |