We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 7bc33bd + e7d3163 commit 45fc515Copy full SHA for 45fc515
tests/test_main.cpp
@@ -234,11 +234,9 @@ int test_main(int argc, char *argv[]) {
234
235
WorkerThreadPool::get_singleton()->init();
236
237
- String test_path = OS::get_singleton()->get_cache_path().path_join("godot_test");
238
-
239
- Ref<DirAccess> da;
240
- if (DirAccess::exists(test_path)) {
241
- da = DirAccess::open(test_path);
+ {
+ const String test_path = TestUtils::get_temp_path("");
+ Ref<DirAccess> da = DirAccess::open(test_path); // get_temp_path() automatically creates the folder.
242
ERR_FAIL_COND_V(da.is_null(), 0);
243
ERR_FAIL_COND_V_MSG(da->erase_contents_recursive() != OK, 0, "Failed to delete files");
244
}
0 commit comments