aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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.
//