From 00cda575c97494d1b6caf2d05ea8a1f8e848cd8a Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Fri, 3 Jun 2022 21:53:48 +0300 Subject: Add --keep-temp common option --- bpkg/pkg-checkout.cxx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'bpkg/pkg-checkout.cxx') 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)) -- cgit v1.1