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