diff --git a/src/libstore/store-api.cc b/src/libstore/store-api.cc index fa6ade750..3bc5e4c57 100644 --- a/src/libstore/store-api.cc +++ b/src/libstore/store-api.cc @@ -619,6 +619,8 @@ void copyPaths(ref srcStore, ref dstStore, const PathSet & storePa for (auto & path : storePaths) if (!valid.count(path)) missing.insert(path); + if (missing.empty()) return; + Activity act(*logger, lvlInfo, actCopyPaths, fmt("copying %d paths", missing.size())); std::atomic nrDone{0};