Skip to content

Commit ce44fbe

Browse files
committed
Careful not to re-apply .group suffix to already-migrated files in seen/
1 parent cdc2af0 commit ce44fbe

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

src/main/java/net/evmodder/evmod/Settings.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,8 +95,10 @@ private final boolean extractConfigValue(HashMap<String, Boolean> config, String
9595
try{
9696
List<Path> paths = Files.walk(Paths.get(mapGroupDir))
9797
.filter(Files::isRegularFile)
98-
.filter(p -> p.getFileName().toString().indexOf('.') == -1
99-
|| (p.getNameCount() > 1 && p.getName(p.getNameCount()-2).toString().equals("seen")))
98+
.filter(p ->
99+
(p.getFileName().toString().indexOf('.') == -1 ||
100+
(p.getNameCount() > 1 && p.getName(p.getNameCount()-2).toString().equals("seen"))
101+
) && !p.getFileName().toString().endsWith(".group"))
100102
.toList();
101103
if(!paths.isEmpty()){
102104
paths.stream().forEach(p -> p.toFile().renameTo(p.resolveSibling(p.getFileName().toString()+".group").toFile()));

0 commit comments

Comments
 (0)