Fixes #24213 (case-sensitive file extension)

suite1.0.3
Fabio Sinibaldi 1 year ago
parent fc638de33c
commit ec6b347f90

@ -100,7 +100,7 @@ public class Files {
toFix=toFix.substring(0,toFix.indexOf("."));
}
return toFix.toLowerCase().
replaceAll("[\\-\\*\\+\\/\\\\ \\[\\]\\(\\)\\.\\\"\\:\\;\\|\\=]","_")+extension;
replaceAll("[\\-\\*\\+\\/\\\\ \\[\\]\\(\\)\\.\\\"\\:\\;\\|\\=]","_")+extension.toLowerCase();
}
public static final File downloadFromUrl(String name,String url) throws IOException {

@ -44,9 +44,8 @@ public class ProfiledConcessioniTests extends AbstractProfiledDocumentsTests{
UserUtils.DEFAULT_ROLES.add("Data-Manager");
// Create new
Document theDoc=Document.parse("{\n" +
"\"posizionamentoScavo\" :{\n" +
"\t\"titolo\" : \"mio titolo\"}}");
Document theDoc=Document.parse("{" +
"\"posizionamentoScavo\" :{\"titolo\" : \"mio titolo\"},\"nome\":\"TEST SDI Extensions\"}");
theDoc.put("startTime", LocalDateTime.now());
@ -68,7 +67,7 @@ public class ProfiledConcessioniTests extends AbstractProfiledDocumentsTests{
"$.posizionamentoScavo."+ Field.CHILDREN+"[?(@.fileset)]",
null,
RegisterFileSetRequest.ClashOptions.MERGE_EXISTING,
"concessioni/pos.shp");
"concessioni/pos.SHP");
System.out.println("Registered posizionamento, result is "+ Serialization.write(doc));

@ -19,7 +19,7 @@ public abstract class SupportedFormat {
case ".tif" : {toReturn.add(new SupportedFormat(".tif") {
@Override
public void consider(RegisteredFile f) {
if (f.getName().endsWith(getFileExtension())){
if (f.getName().toLowerCase().endsWith(getFileExtension())){
getToUseFileSet().add(f);
isProposedFilesetValid=true;
}
@ -31,7 +31,7 @@ public abstract class SupportedFormat {
@Override
public void consider(RegisteredFile f) {
getToUseFileSet().add(f);
if (f.getName().endsWith(getFileExtension())){
if (f.getName().toLowerCase().endsWith(getFileExtension())){
isProposedFilesetValid=true;
}
}

Loading…
Cancel
Save