getList修正

This commit is contained in:
ろむねこ 2023-12-21 15:06:56 +09:00
parent d0543d89b9
commit 5f74123c63
No known key found for this signature in database
GPG Key ID: FA1F39A1BA37D168

View File

@ -61,10 +61,8 @@ public class FileManagerImpl implements FileManager {
public List<Path> getList() {
List<Path> list = new ArrayList<>();
try (DirectoryStream<Path> stream = Files.newDirectoryStream(currentDir)) {
for (Path entry : stream) {
if (Files.isDirectory(entry)) {
list.add(entry);
}
for (Path entry : stream) { // TODO-rca: エラーハンドリング, 効率化
list.add(entry);
}
} catch (IOException e) {
e.printStackTrace();