Many small fixes [release]

This commit is contained in:
crschnick
2023-03-05 11:39:38 +00:00
parent c936e37509
commit b7fa352ae5
25 changed files with 164 additions and 85 deletions

View File

@@ -34,6 +34,19 @@ public class FileNames {
return components.get(components.size() - 1);
}
public static String getExtension(String file) {
if (file == null || file.isEmpty()) {
return null;
}
var name = FileNames.getFileName(file);
var split = file.split("\\.");
if (split.length == 0) {
return null;
}
return split[split.length - 1];
}
public static String join(String... parts) {
var joined = String.join("/", parts);
return normalize(joined);

View File

@@ -37,7 +37,7 @@ public class ShellDialects {
@Override
public boolean prioritizeLoading() {
return false;
return true;
}
}