Catch errors per file since some may error in isHidden, e.g., so just skip those.

This commit is contained in:
Florian Nücke
2021-06-06 13:40:47 +02:00
parent 9fae40bdc7
commit e338fed9d7

View File

@@ -290,14 +290,17 @@ public class FileChooserScreen extends Screen {
})
.collect(Collectors.toList());
for (final Path path : files) {
if (Files.isHidden(path)) {
continue;
}
try {
if (Files.isHidden(path)) {
continue;
}
if (Files.isDirectory(path)) {
addEntry(createDirectoryEntry(path));
} else {
addEntry(createFileEntry(path));
if (Files.isDirectory(path)) {
addEntry(createDirectoryEntry(path));
} else {
addEntry(createFileEntry(path));
}
} catch (final IOException | SecurityException ignored) {
}
}
} catch (final IOException | SecurityException e) {