add tilter to display only folders with write permissions
Some checks failed
Build / Compile and Test (push) Failing after 0s

This commit is contained in:
Jan-Peter Klein 2024-09-17 16:49:31 +02:00
parent 1946fc6c0e
commit a03d5af144
No known key found for this signature in database
GPG Key ID: 90EDA3A7C822FD0E

View File

@ -69,6 +69,7 @@ public final class GoogleDriveMacLocationPresetsProvider implements LocationPres
try (var dirStream = Files.list(ROOT_LOCATION)) {
return dirStream.filter(path -> Files.isDirectory(path) && PATTERN.test(path.getFileName().toString()))
.flatMap(this::getPresetsFromAccountPath)
.filter(preset -> Files.isWritable(preset.path()))
.toList().stream();
} catch (IOException | UncheckedIOException e) {
return Stream.empty();