From b3a192927418670a86f567a51189a82c8e9cd5c0 Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Sun, 11 Jun 2023 12:31:55 +0300 Subject: Don't check for directory existence in simulate mode in pkg-unpack --- bpkg/pkg-unpack.cxx | 6 +++--- 1 file 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. // -- cgit v1.1