aboutsummaryrefslogtreecommitdiff
path: root/bpkg/pkg-checkout.cxx
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2022-06-03 21:53:48 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2022-06-07 13:49:14 +0300
commit00cda575c97494d1b6caf2d05ea8a1f8e848cd8a (patch)
tree19adfe4823b460367b80630c2b43ed553fc391a0 /bpkg/pkg-checkout.cxx
parentdeecf4971fbc90b472135e30387bc76e9788061b (diff)
Add --keep-temp common option
Diffstat (limited to 'bpkg/pkg-checkout.cxx')
-rw-r--r--bpkg/pkg-checkout.cxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/bpkg/pkg-checkout.cxx b/bpkg/pkg-checkout.cxx
index f2c373d..d5b4837 100644
--- a/bpkg/pkg-checkout.cxx
+++ b/bpkg/pkg-checkout.cxx
@@ -197,8 +197,8 @@ namespace bpkg
// of it (note that if they appear on different filesystems that won't
// be possible).
//
- auto ti (temp_dir.find (rdb.config_orig));
- assert (ti != temp_dir.end ());
+ auto ti (tmp_dirs.find (rdb.config_orig));
+ assert (ti != tmp_dirs.end ());
const dir_path& tdir (ti->second);
// Try to reuse the cached repository (moved to the temporary directory
@@ -224,7 +224,7 @@ namespace bpkg
// The repository temporary directory.
//
- auto_rmdir rmt (tdir / sd);
+ auto_rmdir rmt (tdir / sd, !keep_tmp);
// Move the repository to the temporary directory.
//
@@ -258,7 +258,7 @@ namespace bpkg
// The temporary out of source directory that is required for the dist
// meta-operation.
//
- auto_rmdir rmo (tdir / dir_path (n.string ()));
+ auto_rmdir rmo (tdir / dir_path (n.string ()), !keep_tmp);
const dir_path& od (rmo.path);
if (exists (od))