aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Piotr Jaroszyński <peper@gentoo.org> 2007-11-21 15:03:44 +0000
committerAvatar Piotr Jaroszyński <peper@gentoo.org> 2007-11-21 15:03:44 +0000
commitce1ca8fc3a3963309e1002ee2072888d9d57badc (patch)
tree096f32623871da451ce25f6908ed02d6cf638805
parent6ae1d90a0cebdc74a3368af481b3d429a8d9c8f4 (diff)
downloadpaludis-ce1ca8fc3a3963309e1002ee2072888d9d57badc.tar.gz
paludis-ce1ca8fc3a3963309e1002ee2072888d9d57badc.tar.xz
Make merger warn if it merges an empty directory.
-rw-r--r--paludis/merger.cc8
1 files changed, 7 insertions, 1 deletions
diff --git a/paludis/merger.cc b/paludis/merger.cc
index 032d294..1889640 100644
--- a/paludis/merger.cc
+++ b/paludis/merger.cc
@@ -152,7 +152,13 @@ Merger::do_dir_recursive(bool is_check, const FSEntry & src, const FSEntry & dst
on_enter_dir(is_check, src);
- for (DirIterator d(src, false), d_end ; d != d_end ; ++d)
+ DirIterator d(src, false), d_end;
+
+ if (! is_check && d == d_end)
+ Log::get_instance()->message(ll_warning, lc_context) << "Installing empty directory '"
+ << stringify(dst) << "'";
+
+ for ( ; d != d_end ; ++d)
{
EntryType m(entry_type(*d));
switch (m)