aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--build2/dist/operation.cxx3
1 files changed, 3 insertions, 0 deletions
diff --git a/build2/dist/operation.cxx b/build2/dist/operation.cxx
index ff0c0d5..612edc8 100644
--- a/build2/dist/operation.cxx
+++ b/build2/dist/operation.cxx
@@ -323,6 +323,7 @@ namespace build2
if (build2::rmdir_r (td, true, 2) == rmdir_status::not_empty)
fail << "unable to clean target directory " << td;
+ auto_rmdir rm_td (td); // Clean it up if things go bad.
install (dist_cmd, td);
// Copy over all the files. Apply post-processing callbacks.
@@ -421,6 +422,8 @@ namespace build2
diag_progress.clear ();
}
+ rm_td.cancel ();
+
// Archive if requested.
//
if (auto l = rs->vars["dist.archives"])