aboutsummaryrefslogtreecommitdiff
path: root/src/libutil/archive.hh
diff options
context:
space:
mode:
authorCarlo Nucera <carlo.nucera@protonmail.com>2020-07-15 12:58:38 -0400
committerCarlo Nucera <carlo.nucera@protonmail.com>2020-07-15 13:06:08 -0400
commit2d2a10e79a3abb5eb2ae271f5ff1ca14b3ae6cad (patch)
treedf0e14e1d5035215df034a77506ead1d839caf3b /src/libutil/archive.hh
parent465daa9396a0e4203fb8f575da219ea79c5fefa8 (diff)
parentcff2157185912025c24a1b9dc99056161634176c (diff)
Merge branch 'master' of github.com:NixOS/nix into add-body-to-network-errors
Diffstat (limited to 'src/libutil/archive.hh')
-rw-r--r--src/libutil/archive.hh8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/libutil/archive.hh b/src/libutil/archive.hh
index 32d98a610..302b1bb18 100644
--- a/src/libutil/archive.hh
+++ b/src/libutil/archive.hh
@@ -63,6 +63,14 @@ struct ParseSink
virtual void createSymlink(const Path & path, const string & target) { };
};
+struct TeeParseSink : ParseSink
+{
+ StringSink saved;
+ TeeSource source;
+
+ TeeParseSink(Source & source) : source(source, saved) { }
+};
+
void parseDump(ParseSink & sink, Source & source);
void restorePath(const Path & path, Source & source);