mirror of
https://github.com/vcmi/vcmi.git
synced 2025-07-17 01:32:21 +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:
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user