1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-22 22:13:35 +02:00

Ignore case when checking whether path is white-listed.

Fixes data import with H3 data that has different case in directory names
This commit is contained in:
Ivan Savenko 2023-10-23 19:10:24 +03:00
parent 3880ea58b9
commit 91e202e0e3

View File

@ -127,9 +127,21 @@ public class CopyDataController extends LauncherSettingController<Void, Void>
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());