aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2010-07-29 18:35:00 +0100
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2010-07-31 11:36:05 +0100
commit34d3c892d78025f31203780a2caecc62b323b38f (patch)
tree06351d623fd9f2d50231b52b728cee917dc96ce1
parentf8058cf3d2faad1df09e1a0d1af51a99f3401004 (diff)
downloadpaludis-34d3c892d78025f31203780a2caecc62b323b38f.tar.gz
paludis-34d3c892d78025f31203780a2caecc62b323b38f.tar.xz
Split out add_file
-rw-r--r--paludis/tar_merger.cc8
-rw-r--r--paludis/tar_merger.hh2
2 files changed, 9 insertions, 1 deletions
diff --git a/paludis/tar_merger.cc b/paludis/tar_merger.cc
index 9f73eb2..7eca0f7 100644
--- a/paludis/tar_merger.cc
+++ b/paludis/tar_merger.cc
@@ -124,7 +124,13 @@ TarMerger::on_file_main(bool is_check, const FSEntry & src, const FSEntry & dst)
if (is_check)
return;
- (*TarMergerHandle::get_instance()->add_file)(_imp->tar, stringify(src), strip_leading(stringify(dst / src.basename()), "/"));
+ add_file(src, dst / src.basename());
+}
+
+void
+TarMerger::add_file(const FSEntry & src, const FSEntry & dst)
+{
+ (*TarMergerHandle::get_instance()->add_file)(_imp->tar, stringify(src), strip_leading(stringify(dst), "/"));
}
void
diff --git a/paludis/tar_merger.hh b/paludis/tar_merger.hh
index ddb3e8d..5f71a46 100644
--- a/paludis/tar_merger.hh
+++ b/paludis/tar_merger.hh
@@ -74,6 +74,8 @@ namespace paludis
protected:
virtual FSEntry canonicalise_root_path(const FSEntry & f);
+ virtual void add_file(const FSEntry &, const FSEntry &);
+
public:
TarMerger(const TarMergerParams &);
~TarMerger();