mirror of
https://github.com/GravitLauncher/Launcher
synced 2024-11-15 11:39:11 +03:00
[FIX] Используем String,join для FileNameMatcher
This commit is contained in:
parent
0495c26546
commit
bda1913ca0
1 changed files with 8 additions and 6 deletions
|
@ -11,13 +11,14 @@ public final class FileNameMatcher {
|
|||
|
||||
private static boolean anyMatch(String[] entries, Collection<String> path) {
|
||||
//return path.stream().anyMatch(e -> Arrays.stream(entries).anyMatch(p -> p.endsWith(e)));
|
||||
String jpath = String.join("/", path);
|
||||
for(String e : entries)
|
||||
{
|
||||
String[] split = e.split("/");
|
||||
int index = 0;
|
||||
for(String p : path)
|
||||
{
|
||||
if(index>=split.length)
|
||||
/*String[] split = e.split("/");
|
||||
//int index = 0;
|
||||
//for(String p : path)
|
||||
//{
|
||||
// if(index>=split.length)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
@ -25,7 +26,8 @@ private static boolean anyMatch(String[] entries, Collection<String> path) {
|
|||
break;
|
||||
}
|
||||
index++;
|
||||
}
|
||||
}*/
|
||||
if(jpath.startsWith(e)) return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue