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
Hide 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 {
...
@@ -167,9 +167,11 @@ public final class FileUtils {
}
}
}
}
@Deprecated
// No current uses of this anyway
public
static
String
getFilenameWithoutPath
(
String
fileName
)
{
public
static
String
getFilenameWithoutPath
(
String
fileName
)
{
if
(
fileName
.
indexOf
(
"."
)
>
0
)
{
int
i
=
fileName
.
lastIndexOf
(
"."
);
return
fileName
.
substring
(
0
,
fileName
.
lastIndexOf
(
"."
));
if
(
i
>
0
)
{
return
fileName
.
substring
(
0
,
i
);
}
else
{
}
else
{
return
fileName
;
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