Fix dataloader not getting path correctly

This commit is contained in:
Melledy 2022-05-19 03:00:59 -07:00
parent a088ea9b6b
commit 86dee4bae7

View File

@ -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);
} }