aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Bauer <mjbauer95@gmail.com>2020-06-12 14:57:45 -0500
committerMatthew Bauer <mjbauer95@gmail.com>2020-06-12 14:57:45 -0500
commit5b386b05f58b1ed996afe47791d85e6d20da91a2 (patch)
treeb7082a2b2b4984c334be763e35f52bbcbdaaff3a
parent85d01e1f658d93a0ea8d0396b1e79d03c2ff1da2 (diff)
Recompute storePath based on isContentAddressed
-rw-r--r--src/libstore/store-api.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libstore/store-api.cc b/src/libstore/store-api.cc
index afa557e16..c8dc4744f 100644
--- a/src/libstore/store-api.cc
+++ b/src/libstore/store-api.cc
@@ -581,7 +581,7 @@ void copyStorePath(ref<Store> srcStore, ref<Store> dstStore,
uint64_t total = 0;
// recompute store path on the chance dstStore does it differently
- if (hasPrefix(info->ca, "fixed:") && info->references.empty()) {
+ if (info->isContentAddressed(*srcStore)) {
auto info2 = make_ref<ValidPathInfo>(*info);
FileIngestionMethod ingestionMethod { info->ca.compare(6, 2, "r:") == 0 };
Hash hash(std::string(info->ca, ingestionMethod == FileIngestionMethod::Recursive ? 8 : 6));