mirror of
https://github.com/vcmi/vcmi.git
synced 2024-12-22 22:13:35 +02:00
Merge pull request #3101 from IvanSavenko/fix_android_data_import
Fix data import on Android
This commit is contained in:
commit
18b8971d6f
@ -22,7 +22,9 @@ public class Storage
|
|||||||
public static boolean testH3DataFolder(final File baseDir)
|
public static boolean testH3DataFolder(final File baseDir)
|
||||||
{
|
{
|
||||||
final File testH3Data = new File(baseDir, "Data");
|
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){
|
public static String getH3DataFolder(Context context){
|
||||||
|
@ -127,8 +127,20 @@ public class CopyDataController extends LauncherSettingController<Void, Void>
|
|||||||
|
|
||||||
for (DocumentFile child : sourceDir.listFiles())
|
for (DocumentFile child : sourceDir.listFiles())
|
||||||
{
|
{
|
||||||
if (allowed != null && !allowed.contains(child.getName()))
|
if (allowed != null)
|
||||||
{
|
{
|
||||||
|
boolean fileAllowed = false;
|
||||||
|
|
||||||
|
for (String str : allowed)
|
||||||
|
{
|
||||||
|
if (str.equalsIgnoreCase(child.getName()))
|
||||||
|
{
|
||||||
|
fileAllowed = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!fileAllowed)
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user