diff options
author | John Ericson <John.Ericson@Obsidian.Systems> | 2020-06-02 16:07:25 +0000 |
---|---|---|
committer | John Ericson <John.Ericson@Obsidian.Systems> | 2020-06-02 16:07:25 +0000 |
commit | 64cffb804ade911167d71e033c5c83d9c8300651 (patch) | |
tree | 75403238922ce219110be5fe24995163d49ca08b /src/libstore/export-import.cc | |
parent | 450dcf2c1b60a36f5ffeab2411805287d122bcdd (diff) | |
parent | bfa1acd85c4d15c5ea95337138f47672659e2a9e (diff) |
Merge remote-tracking branch 'upstream/master' into no-hash-type-unknown
Diffstat (limited to 'src/libstore/export-import.cc')
-rw-r--r-- | src/libstore/export-import.cc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/libstore/export-import.cc b/src/libstore/export-import.cc index e96b5610a..aef5cc6da 100644 --- a/src/libstore/export-import.cc +++ b/src/libstore/export-import.cc @@ -1,3 +1,4 @@ +#include "serialise.hh" #include "store-api.hh" #include "archive.hh" #include "worker-protocol.hh" @@ -100,7 +101,9 @@ StorePaths Store::importPaths(Source & source, std::shared_ptr<FSAccessor> acces if (readInt(source) == 1) readString(source); - addToStore(info, tee.source.data, NoRepair, checkSigs, accessor); + // Can't use underlying source, which would have been exhausted + auto source = StringSource { *tee.source.data }; + addToStore(info, source, NoRepair, checkSigs, accessor); res.push_back(info.path.clone()); } |