Fix dataloader not getting path correctly

This commit is contained in:
Melledy 2022-05-19 03:00:59 -07:00
parent 29941aa8d0
commit f876470369

View File

@ -48,13 +48,11 @@ public class DataLoader {
}
public static void CheckAllFiles() {
String pathSplitter = "defaults" + Pattern.quote(FileSystems.getDefault().getSeparator()) + "data" + Pattern.quote(FileSystems.getDefault().getSeparator());
try {
List<Path> filenames = FileUtils.getPathsFromResource("/defaults/data/");
for (Path file : filenames) {
String relativePath = String.valueOf(file).split(pathSplitter)[1];
String relativePath = String.valueOf(file).split("defaults[\\\\\\/]data[\\\\\\/]")[1];
CheckAndCopyData(relativePath);
}