aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2021-08-10 12:39:12 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2021-08-10 12:39:57 +0300
commit6ae3a7ede926c472686a9e22072970926eef9d90 (patch)
treea23efec7c5ac101c4194007f229134d057c1e6da
parent6cb3eff4780aeeaf0757a0410f62f2cc5ac9f3b0 (diff)
Fix cfg_create() not to re-initialize temporary directory facility
-rw-r--r--bpkg/cfg-create.cxx5
1 files changed, 3 insertions, 2 deletions
diff --git a/bpkg/cfg-create.cxx b/bpkg/cfg-create.cxx
index 29de01c..8101dc0 100644
--- a/bpkg/cfg-create.cxx
+++ b/bpkg/cfg-create.cxx
@@ -165,9 +165,10 @@ namespace bpkg
}
}
- // Initialize tmp directory.
+ // Initialize tmp directory, unless it is already initialized.
//
- init_tmp (c);
+ if (temp_dir.empty ())
+ init_tmp (c);
// Create the database.
//