1
0
mirror of https://github.com/luanti-org/luanti.git synced 2026-01-13 12:45:29 +01:00

Fix errors with fs::RecursiveDelete() on paths that don't exist

This commit is contained in:
sfan5
2025-12-10 21:32:05 +01:00
committed by GitHub
parent f6c472fd2c
commit 2ecd127f96
3 changed files with 18 additions and 15 deletions

View File

@@ -599,8 +599,7 @@ bool setSystemPaths()
// Delete tmp folder if it exists (it only ever contained
// a temporary ogg file, which is no longer used).
if (fs::PathExists(local_cache_path + DIR_DELIM + "tmp"))
fs::RecursiveDelete(local_cache_path + DIR_DELIM + "tmp");
fs::RecursiveDelete(local_cache_path + DIR_DELIM + "tmp");
// Bail if migration impossible
if (path_cache == local_cache_path || !fs::PathExists(local_cache_path)