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
86dee4ba
Commit
86dee4ba
authored
May 19, 2022
by
Melledy
Browse files
Fix dataloader not getting path correctly
parent
a088ea9b
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/main/java/emu/grasscutter/data/DataLoader.java
View file @
86dee4ba
...
@@ -48,13 +48,11 @@ public class DataLoader {
...
@@ -48,13 +48,11 @@ public class DataLoader {
}
}
public
static
void
CheckAllFiles
()
{
public
static
void
CheckAllFiles
()
{
String
pathSplitter
=
"defaults"
+
Pattern
.
quote
(
FileSystems
.
getDefault
().
getSeparator
())
+
"data"
+
Pattern
.
quote
(
FileSystems
.
getDefault
().
getSeparator
());
try
{
try
{
List
<
Path
>
filenames
=
FileUtils
.
getPathsFromResource
(
"/defaults/data/"
);
List
<
Path
>
filenames
=
FileUtils
.
getPathsFromResource
(
"/defaults/data/"
);
for
(
Path
file
:
filenames
)
{
for
(
Path
file
:
filenames
)
{
String
relativePath
=
String
.
valueOf
(
file
).
split
(
pathSplitter
)[
1
];
String
relativePath
=
String
.
valueOf
(
file
).
split
(
"defaults[\\\\\\/]data[\\\\\\/]"
)[
1
];
CheckAndCopyData
(
relativePath
);
CheckAndCopyData
(
relativePath
);
}
}
...
...
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