diff options
| author | MoonEyes <ducoinbenjamin@yahoo.fr> | 2026-11-29 13:44:40 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-11-29 13:44:40 +0100 |
| commit | 44ddf9b0527022b0bcddd3d4f0bf46382fdb94a5 (patch) | |
| tree | a66e4bd65a3b2e6cb589586225f70e82601ca1a9 /runtime/test/file_system_test.cpp | |
| parent | 0e7e1059d31b01e4a4ee853c1b7652151ee4c559 (diff) | |
| parent | b17397f0dd77280e107de489fc0f2a92471ace60 (diff) | |
Merge pull request #1600 from thiefyzheng/fix/test-tempdir-stripped-env
Diffstat (limited to 'runtime/test/file_system_test.cpp')
| -rw-r--r-- | runtime/test/file_system_test.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/runtime/test/file_system_test.cpp b/runtime/test/file_system_test.cpp index 849df3728..096e18b62 100644 --- a/runtime/test/file_system_test.cpp +++ b/runtime/test/file_system_test.cpp | |||
| @@ -3,6 +3,7 @@ | |||
| 3 | // Every function is resolved through rt::shims::find under the DLL and name an import uses, so the test runs against | 3 | // Every function is resolved through rt::shims::find under the DLL and name an import uses, so the test runs against |
| 4 | // the table the runtime installs rather than a private copy. It works on folders it creates in %TEMP%: a package | 4 | // the table the runtime installs rather than a private copy. It works on folders it creates in %TEMP%: a package |
| 5 | // folder that stands in for the game install, an overlay folder, and a "GAME:" path in each variant. | 5 | // folder that stands in for the game install, an overlay folder, and a "GAME:" path in each variant. |
| 6 | #include "test_temp_dir.h" | ||
| 6 | #include <windows.h> | 7 | #include <windows.h> |
| 7 | 8 | ||
| 8 | #include <aclapi.h> | 9 | #include <aclapi.h> |
| @@ -327,7 +328,7 @@ int main() { | |||
| 327 | LARGE_INTEGER now{}; | 328 | LARGE_INTEGER now{}; |
| 328 | QueryPerformanceCounter(&now); | 329 | QueryPerformanceCounter(&now); |
| 329 | const std::filesystem::path root = | 330 | const std::filesystem::path root = |
| 330 | std::filesystem::temp_directory_path() / ("leonida_file_system_" + std::to_string(GetCurrentProcessId()) + | 331 | testfiles::temp_dir() / ("leonida_file_system_" + std::to_string(GetCurrentProcessId()) + |
| 331 | "_" + std::to_string(now.QuadPart)); | 332 | "_" + std::to_string(now.QuadPart)); |
| 332 | std::error_code ec; | 333 | std::error_code ec; |
| 333 | std::filesystem::remove_all(root, ec); | 334 | std::filesystem::remove_all(root, ec); |