aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2023-06-11 12:31:55 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2023-06-11 12:32:09 +0300
commitb3a192927418670a86f567a51189a82c8e9cd5c0 (patch)
treec5343d5ee54ecc440bece09c19e0c487096077c1
parent64108a67f90ef60f54ea65a0c96d45742a650ab3 (diff)
Don't check for directory existence in simulate mode in pkg-unpack
-rw-r--r--bpkg/pkg-unpack.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/bpkg/pkg-unpack.cxx b/bpkg/pkg-unpack.cxx
index 90ed331..5c88cc6 100644
--- a/bpkg/pkg-unpack.cxx
+++ b/bpkg/pkg-unpack.cxx
@@ -369,13 +369,13 @@ namespace bpkg
dir_path d (c / dir_path (n.string () + '-' + v.string ()));
- if (exists (d))
- fail << "package directory " << d << " already exists";
-
auto_rmdir arm;
if (!simulate)
{
+ if (exists (d))
+ fail << "package directory " << d << " already exists";
+
// If the archive path is not absolute, then it must be relative
// to the configuration.
//