mirror of
https://github.com/Melledy/Grasscutter.git
synced 2024-11-23 17:17:43 +00:00
Fix dataloader not getting path correctly
This commit is contained in:
parent
29941aa8d0
commit
f876470369
@ -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);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user