fix: crash upon deleting cache when no cache exists
This commit is contained in:
parent
f361173546
commit
db66f26f67
1 changed files with 1 additions and 3 deletions
|
|
@ -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()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue