Permalink
Browse files

Do locale independant case conversion on "filetype:" query modifier.

  • Loading branch information...
luccioman committed Dec 4, 2017
1 parent 8fbf25d commit d07006bac461489d70831f700b02e232bc37a837
Showing with 1 addition and 1 deletion.
  1. +1 −1 source/net/yacy/search/query/QueryModifier.java
@@ -214,7 +214,7 @@ private String filetypeParser(String querystring, final String filetypePrefix) {
if ( ftb < 0 ) ftb = querystring.length();
String tmpqueryparameter = querystring.substring(ftp + filetypePrefix.length(), ftb);
querystring = querystring.replace(filetypePrefix + tmpqueryparameter, ""); // replace prefix:Text as found
filetype = tmpqueryparameter.toLowerCase(); // file extension are always compared lowercase, can be converted here for further processing
filetype = tmpqueryparameter.toLowerCase(Locale.ROOT); // file extension are always compared lowercase, can be converted here for further processing
while ( !filetype.isEmpty() && filetype.charAt(0) == '.' ) {
filetype = filetype.substring(1);
}

0 comments on commit d07006b

Please sign in to comment.