From 397740041beec4d4493d7aec21e224b5f7fbfca8 Mon Sep 17 00:00:00 2001 From: John Ayad Date: Fri, 7 Apr 2023 14:41:23 -0400 Subject: [PATCH] Avoid using /tmp --- libmamba/src/core/subdirdata.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libmamba/src/core/subdirdata.cpp b/libmamba/src/core/subdirdata.cpp index d05698d5bd..f4ec84298a 100644 --- a/libmamba/src/core/subdirdata.cpp +++ b/libmamba/src/core/subdirdata.cpp @@ -905,7 +905,9 @@ namespace mamba void MSubdirData::create_target() { auto& ctx = Context::instance(); - m_temp_file = std::make_unique(); + fs::u8path writable_cache_dir = create_cache_dir(m_writable_pkgs_dir); + auto lock = LockFile(writable_cache_dir); + m_temp_file = std::make_unique("mambaf", "", writable_cache_dir); bool use_zst = m_metadata.has_zst.has_value() && m_metadata.has_zst.value().value; m_target = std::make_unique(