Skip to content

Commit

Permalink
Fix single element custom path detection
Browse files Browse the repository at this point in the history
fix issue #105
  • Loading branch information
RoanH committed Sep 26, 2020
1 parent ea0f7bf commit afe5d3c
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions osuSkinChecker/src/me/roan/osuskinchecker/ImageFilter.java
Original file line number Diff line number Diff line change
Expand Up @@ -253,12 +253,14 @@ protected ImageMeta matches(File file, String fn, Deque<String> path){
}else{
return null;
}
}else{
if(fn.startsWith((customDefault + name).toLowerCase(Locale.ROOT))){
extra = fn.substring(customDefault.length() + name.length());
}else if(customPath.length == 1){
if(fn.startsWith((customPath[0] + name).toLowerCase(Locale.ROOT))){
extra = fn.substring(customPath[0].length() + name.length());
}else{
return null;
}
}else{
return null;
}
}else{
//strip file name
Expand Down

0 comments on commit afe5d3c

Please sign in to comment.