aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/libstore/store-api.cc1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/libstore/store-api.cc b/src/libstore/store-api.cc
index 9c755965e..9ab3f3632 100644
--- a/src/libstore/store-api.cc
+++ b/src/libstore/store-api.cc
@@ -822,6 +822,7 @@ void copyPaths(ref<Store> from, ref<Store> to, const Paths & storePaths, bool su
PathSet(storePaths.begin(), storePaths.end()),
[&](const Path & storePath) {
+ if (to->isValidPath(storePath)) return PathSet();
return from->queryPathInfo(storePath)->references;
},