1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-01-10 00:43:59 +02:00

Another workaround for another crash on Android launcher

This commit is contained in:
Ivan Savenko 2023-08-06 12:45:20 +03:00
parent 06b0ebf08c
commit a81f18765c

View File

@ -81,7 +81,7 @@ public class FileUtil
{ {
if (file == null) if (file == null)
{ {
Log.e("Broken path given to fileutil"); Log.e("Broken path given to fileutil::ensureWriteable");
return false; return false;
} }
@ -99,6 +99,12 @@ public class FileUtil
public static boolean clearDirectory(final File dir) public static boolean clearDirectory(final File dir)
{ {
if (dir == null)
{
Log.e("Broken path given to fileutil::clearDirectory");
return false;
}
for (final File f : dir.listFiles()) for (final File f : dir.listFiles())
{ {
if (f.isDirectory() && !clearDirectory(f)) if (f.isDirectory() && !clearDirectory(f))