Fixed exsiting file discovery for installer
This commit is contained in:
@@ -75,22 +75,24 @@ public class InstallListener implements ActionListener
|
|||||||
|
|
||||||
private boolean isPartialFileNameInFolder(File path, String... parts)
|
private boolean isPartialFileNameInFolder(File path, String... parts)
|
||||||
{
|
{
|
||||||
if(path.exists())
|
if(path.exists() && path.isDirectory())
|
||||||
{
|
{
|
||||||
int contains = 0;
|
|
||||||
|
|
||||||
for(File file : path.listFiles())
|
for(File file : path.listFiles())
|
||||||
{
|
{
|
||||||
|
int matches = 0;
|
||||||
|
|
||||||
for(String part : parts)
|
for(String part : parts)
|
||||||
{
|
{
|
||||||
if(this.containsIgnoreCase(file.getName(), part))
|
if(this.containsIgnoreCase(file.getName(), part))
|
||||||
{
|
{
|
||||||
contains++;
|
if(matches < parts.length)
|
||||||
}
|
{
|
||||||
|
matches++;
|
||||||
if(contains == parts.length)
|
}
|
||||||
{
|
else
|
||||||
return true;
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user