diff options
author | Matthew Bauer <mjbauer95@gmail.com> | 2020-06-12 14:53:30 -0500 |
---|---|---|
committer | Matthew Bauer <mjbauer95@gmail.com> | 2020-06-12 14:53:30 -0500 |
commit | 85d01e1f658d93a0ea8d0396b1e79d03c2ff1da2 (patch) | |
tree | 63fc5319157cc4b569129777b233d200bca42ec6 | |
parent | 1c148a80fe05580f94e624134b923799f6cbc7b3 (diff) |
Don’t use makeStorePath
-rw-r--r-- | src/libstore/store-api.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/libstore/store-api.cc b/src/libstore/store-api.cc index 1b340bf6c..afa557e16 100644 --- a/src/libstore/store-api.cc +++ b/src/libstore/store-api.cc @@ -583,7 +583,9 @@ void copyStorePath(ref<Store> srcStore, ref<Store> dstStore, // recompute store path on the chance dstStore does it differently if (hasPrefix(info->ca, "fixed:") && info->references.empty()) { auto info2 = make_ref<ValidPathInfo>(*info); - info2->path = dstStore->makeStorePath("output:out", hashString(htSHA256, info->ca), storePath.name()); + FileIngestionMethod ingestionMethod { info->ca.compare(6, 2, "r:") == 0 }; + Hash hash(std::string(info->ca, ingestionMethod == FileIngestionMethod::Recursive ? 8 : 6)); + info2->path = dstStore->makeFixedOutputPath(ingestionMethod, hash, storePath.name()); info = info2; } |