diff options
author | Eelco Dolstra <edolstra@gmail.com> | 2020-12-15 12:23:10 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-15 12:23:10 +0100 |
commit | e3ddffb27e5fc37a209cfd843c6f7f6a9460a8ec (patch) | |
tree | a13e4323971b88af7fb3001e0cd2cef39b39b09f /src | |
parent | f2f60bf5d6c95453f89e47e01fe0bd6a7fdc85bb (diff) | |
parent | 44c3fbc6e03ec518f6174c2b7c21b603973beb91 (diff) |
Merge pull request #4361 from tweag/fix-binary-caches-addTextToStore
Fix `addTextToStore` for binary caches
Diffstat (limited to 'src')
-rw-r--r-- | src/libstore/binary-cache-store.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/libstore/binary-cache-store.cc b/src/libstore/binary-cache-store.cc index 5b081c1ae..94c11355f 100644 --- a/src/libstore/binary-cache-store.cc +++ b/src/libstore/binary-cache-store.cc @@ -433,7 +433,9 @@ StorePath BinaryCacheStore::addTextToStore(const string & name, const string & s if (!repair && isValidPath(path)) return path; - auto source = StringSource { s }; + StringSink sink; + dumpString(s, sink); + auto source = StringSource { *sink.s }; return addToStoreCommon(source, repair, CheckSigs, [&](HashResult nar) { ValidPathInfo info { path, nar.first }; info.narSize = nar.second; |