aboutsummaryrefslogtreecommitdiff
path: root/src/libstore/store-api.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/libstore/store-api.cc')
-rw-r--r--src/libstore/store-api.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/libstore/store-api.cc b/src/libstore/store-api.cc
index b0ca1321c..60e87918a 100644
--- a/src/libstore/store-api.cc
+++ b/src/libstore/store-api.cc
@@ -1101,7 +1101,8 @@ std::map<StorePath, StorePath> copyPaths(
return storePathForDst;
};
- uint64_t total = 0;
+ // total is accessed by each copy, which are each handled in separate threads
+ std::atomic<uint64_t> total = 0;
for (auto & missingPath : sortedMissing) {
auto info = srcStore.queryPathInfo(missingPath);