feat: ensure .venv and archive folders are ignored during model scanning and cleanup

This commit is contained in:
Thomas
2026-05-05 18:51:57 +02:00
parent a37f6d5d9e
commit b24bb15216
4 changed files with 36 additions and 13 deletions
@@ -1298,6 +1298,10 @@ public class Main extends JFrame {
List<Path> allFiles = Files.walk(root.toPath())
.filter(Files::isRegularFile)
.filter(p -> {
String relPath = root.toPath().relativize(p).toString().toLowerCase();
return !relPath.contains(".venv") && !relPath.contains("archive");
})
.filter(p -> {
String n = p.getFileName().toString().toLowerCase();
return n.endsWith(".safetensors") || n.endsWith(".sft") || n.endsWith(".ckpt") || n.endsWith(".pth") || n.endsWith(".pt") || n.endsWith(".bin");