fix: crash upon deleting cache when no cache exists

This commit is contained in:
rushiiMachine 2025-04-06 20:54:38 -07:00
parent f361173546
commit db66f26f67
No known key found for this signature in database
GPG key ID: DCBE5952BB3B6420

View file

@ -47,9 +47,7 @@ class PathManager(
* Delete the entire cache dir and recreate it. * Delete the entire cache dir and recreate it.
*/ */
fun clearCache() { fun clearCache() {
if (!cacheDir.deleteRecursively()) cacheDir.deleteRecursively()
throw IllegalStateException("Failed to delete cache")
cacheDir.mkdirs() cacheDir.mkdirs()
} }