diff --git a/src/main/java/emu/grasscutter/utils/FileUtils.java b/src/main/java/emu/grasscutter/utils/FileUtils.java index 4653423c5..e44d2b2f0 100644 --- a/src/main/java/emu/grasscutter/utils/FileUtils.java +++ b/src/main/java/emu/grasscutter/utils/FileUtils.java @@ -167,9 +167,11 @@ public final class FileUtils { } } + @Deprecated // No current uses of this anyway public static String getFilenameWithoutPath(String fileName) { - if (fileName.indexOf(".") > 0) { - return fileName.substring(0, fileName.lastIndexOf(".")); + int i = fileName.lastIndexOf("."); + if (i > 0) { + return fileName.substring(0, i); } else { return fileName; }