aboutsummaryrefslogtreecommitdiff
path: root/build2/filesystem.txx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2017-11-30 14:50:05 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2017-11-30 14:50:05 +0200
commit11dce6c2fa7dc39cd9e40c0fedda3280aa2757ad (patch)
tree7ae301e2e7df6f2679faf9d78622d58ae99c7fd2 /build2/filesystem.txx
parent879b5f52cb86f24352f4ed245fcce5f1ab885f97 (diff)
Implement module sidebuilds cleanup using scope operation callbacks
Diffstat (limited to 'build2/filesystem.txx')
-rw-r--r--build2/filesystem.txx6
1 files changed, 4 insertions, 2 deletions
diff --git a/build2/filesystem.txx b/build2/filesystem.txx
index fe56498..8e50592 100644
--- a/build2/filesystem.txx
+++ b/build2/filesystem.txx
@@ -2,6 +2,8 @@
// copyright : Copyright (c) 2014-2017 Code Synthesis Ltd
// license : MIT; see accompanying LICENSE file
+#include <type_traits> // is_base_of
+
#include <build2/context.hxx> // work
#include <build2/diagnostics.hxx>
@@ -64,9 +66,9 @@ namespace build2
if (verb >= v)
{
if (verb >= 2)
- text << "rm " << d;
+ text << "rmdir " << d;
else if (verb)
- text << "rm " << t;
+ text << (std::is_base_of<dir_path, T>::value ? "rmdir " : "rm ") << t;
}
};