fix terrascript loading on windows

This commit is contained in:
dfsek
2021-12-03 15:55:56 -07:00
parent fe57ae2471
commit 4d2639207d

View File

@@ -14,6 +14,8 @@ public class StringUtil {
public static String fileName(String path) {
if(path.contains(File.separator)) {
return path.substring(path.lastIndexOf(File.separatorChar) + 1, path.lastIndexOf('.'));
} else if(path.contains("/")) {
return path.substring(path.lastIndexOf("/") + 1, path.lastIndexOf('.'));
} else if(path.contains(".")) {
return path.substring(0, path.lastIndexOf('.'));
} else {