mirror of
https://github.com/PolyhedralDev/Terra.git
synced 2026-10-20 07:24:21 +00:00
refactor: move validatePathIsMember logic to NIO files API
This commit is contained in:
+1
-2
@@ -68,8 +68,7 @@ public class ConfigRegistry extends OpenRegistryImpl<ConfigPack> implements Exte
|
||||
|
||||
@Override
|
||||
public boolean validatePathIsMember(Path path) {
|
||||
var file = path.toFile();
|
||||
return file.isDirectory() || file.getName().endsWith(".zip");
|
||||
return Files.isDirectory(path)|| path.getFileName().endsWith(".zip");
|
||||
}
|
||||
|
||||
public static class PackLoadFailuresException extends Exception {
|
||||
|
||||
+1
-2
@@ -68,7 +68,6 @@ public class MetaConfigRegistry extends OpenRegistryImpl<MetaPack> implements Ex
|
||||
|
||||
@Override
|
||||
public boolean validatePathIsMember(Path path) {
|
||||
var file = path.toFile();
|
||||
return file.isDirectory() || file.getName().endsWith(".zip");
|
||||
return Files.isDirectory(path) || path.getFileName().endsWith(".zip");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user