Recompute storePath based on isContentAddressed

This commit is contained in:
Matthew Bauer 2020-06-12 14:57:45 -05:00
parent 85d01e1f65
commit 5b386b05f5

View file

@ -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));