Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
ziqian zhang
Grasscutter
Commits
54ad108a
Commit
54ad108a
authored
Oct 22, 2022
by
AnimeGitB
Browse files
Fix edge case on FileUtils::getFilenameWithoutPath
parent
ccf182d6
Changes
1
Show whitespace changes
Inline
Side-by-side
src/main/java/emu/grasscutter/utils/FileUtils.java
View file @
54ad108a
...
...
@@ -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
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment