mirror of
https://github.com/cryptomator/cryptomator.git
synced 2024-11-26 21:40:29 +00:00
filter hidden directories
This commit is contained in:
parent
8fb95b67d9
commit
1946fc6c0e
@ -79,6 +79,13 @@ public final class GoogleDriveMacLocationPresetsProvider implements LocationPres
|
||||
try (var driveStream = Files.newDirectoryStream(accountPath, Files::isDirectory)) {
|
||||
List<Path> directories = StreamSupport.stream(driveStream.spliterator(), false).toList();
|
||||
return directories.stream()
|
||||
.filter(drivePath -> {
|
||||
try {
|
||||
return !Files.isHidden(drivePath);
|
||||
} catch (IOException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
})
|
||||
.map(drivePath -> new LocationPreset(getDriveLocationString(accountPath, drivePath), drivePath));
|
||||
} catch (IOException e) {
|
||||
return Stream.empty();
|
||||
|
Loading…
Reference in New Issue
Block a user