aboutsummaryrefslogtreecommitdiff
path: root/src/libutil/archive.hh
diff options
context:
space:
mode:
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);