diff --git a/android/vcmi-app/src/main/java/eu/vcmi/vcmi/Storage.java b/android/vcmi-app/src/main/java/eu/vcmi/vcmi/Storage.java index 9986f890e..b3fc1b9db 100644 --- a/android/vcmi-app/src/main/java/eu/vcmi/vcmi/Storage.java +++ b/android/vcmi-app/src/main/java/eu/vcmi/vcmi/Storage.java @@ -22,7 +22,9 @@ public class Storage public static boolean testH3DataFolder(final File baseDir) { final File testH3Data = new File(baseDir, "Data"); - return testH3Data.exists(); + final File testH3data = new File(baseDir, "data"); + final File testH3DATA = new File(baseDir, "DATA"); + return testH3Data.exists() || testH3data.exists() || testH3DATA.exists(); } public static String getH3DataFolder(Context context){ diff --git a/android/vcmi-app/src/main/java/eu/vcmi/vcmi/settings/CopyDataController.java b/android/vcmi-app/src/main/java/eu/vcmi/vcmi/settings/CopyDataController.java index 9acf5e0a2..2d5396d88 100644 --- a/android/vcmi-app/src/main/java/eu/vcmi/vcmi/settings/CopyDataController.java +++ b/android/vcmi-app/src/main/java/eu/vcmi/vcmi/settings/CopyDataController.java @@ -127,9 +127,21 @@ public class CopyDataController extends LauncherSettingController for (DocumentFile child : sourceDir.listFiles()) { - if (allowed != null && !allowed.contains(child.getName())) + if (allowed != null) { - continue; + boolean fileAllowed = false; + + for (String str : allowed) + { + if (str.equalsIgnoreCase(child.getName())) + { + fileAllowed = true; + break; + } + } + + if (!fileAllowed) + continue; } File exported = new File(targetDir, child.getName());