upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/runtime/src/pe_loader.cpp
diff options
context:
space:
mode:
authorOreoFR <29048345+OreoFR@users.noreply.github.com>2026-11-30 14:29:20 +0100
committerOreoFR <29048345+OreoFR@users.noreply.github.com>2026-11-30 14:29:20 +0100
commitbede3ad0d36e95d73148d2562fac5af45fb2f488 (patch)
tree4a3f5027dbefdbc87f37a1a031437bd310a1bc07 /runtime/src/pe_loader.cpp
parentce907ce7568d82bd78237fd421d426f36890371b (diff)
parentf9f3ec4c68de13f0fe167f7619072613ba77d1c8 (diff)
Merge origin/main (f9f3ec4c6) into the carry of #2062
Current main after #2566; no new conflicts on top of the earlier carry merge. Co-authored-by: Galaxy <23423870+thegalaxydev@users.noreply.github.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'runtime/src/pe_loader.cpp')
-rw-r--r--runtime/src/pe_loader.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/runtime/src/pe_loader.cpp b/runtime/src/pe_loader.cpp
index 303469b06..49588b424 100644
--- a/runtime/src/pe_loader.cpp
+++ b/runtime/src/pe_loader.cpp
@@ -188,6 +188,15 @@ std::filesystem::path tls_host_base_path() {
188} 188}
189 189
190std::filesystem::path tls_host_clone_dir() { 190std::filesystem::path tls_host_clone_dir() {
191 if (const char* dir = std::getenv("LEONIDA_TEST_DIR"); dir && *dir) return std::filesystem::path(dir);
192 const char* tmp = std::getenv("TMP");
193 const char* temp = std::getenv("TEMP");
194 const char* profile = std::getenv("USERPROFILE");
195 if ((!tmp || !*tmp) && (!temp || !*temp) && (!profile || !*profile)) {
196 std::error_code ec;
197 auto cwd = std::filesystem::current_path(ec);
198 if (!ec) return cwd;
199 }
191 wchar_t buf[MAX_PATH]; 200 wchar_t buf[MAX_PATH];
192 DWORD n = GetTempPathW(MAX_PATH, buf); 201 DWORD n = GetTempPathW(MAX_PATH, buf);
193 if (n > 0 && n < MAX_PATH) return std::filesystem::path(buf); 202 if (n > 0 && n < MAX_PATH) return std::filesystem::path(buf);