Makes extension check case insensitive
This commit is contained in:
parent
56f5e31934
commit
f81a21b9e9
@ -52,7 +52,7 @@ public final class FileUtil {
|
|||||||
}
|
}
|
||||||
//Get a list of all files which are folders and has one of the extensions specified
|
//Get a list of all files which are folders and has one of the extensions specified
|
||||||
File[] foundFiles = folder.listFiles((file) -> file.isFile() &&
|
File[] foundFiles = folder.listFiles((file) -> file.isFile() &&
|
||||||
ListUtil.listContains(extensions, (item) -> file.getName().endsWith(item)));
|
ListUtil.listContains(extensions, (item) -> file.getName().toLowerCase().endsWith(item)));
|
||||||
//Return if recursion is finished
|
//Return if recursion is finished
|
||||||
if (maxRecursions == 1) {
|
if (maxRecursions == 1) {
|
||||||
return foundFiles;
|
return foundFiles;
|
||||||
|
Loading…
Reference in New Issue
Block a user