diff --git a/src/main/java/org/cryptomator/common/locationpresets/GoogleDriveMacLocationPresetsProvider.java b/src/main/java/org/cryptomator/common/locationpresets/GoogleDriveMacLocationPresetsProvider.java index 6f4f13b4a..2bf952e82 100644 --- a/src/main/java/org/cryptomator/common/locationpresets/GoogleDriveMacLocationPresetsProvider.java +++ b/src/main/java/org/cryptomator/common/locationpresets/GoogleDriveMacLocationPresetsProvider.java @@ -106,7 +106,13 @@ public final class GoogleDriveMacLocationPresetsProvider implements LocationPres private Stream getPresetsFromAccountPath(Path accountPath) { try (var driveStream = Files.list(accountPath)) { List directories = StreamSupport.stream(driveStream.spliterator(), false).toList(); - return directories.stream().filter(preset -> MY_DRIVE_TRANSLATIONS.stream().anyMatch(translation -> preset.getFileName().toString().equalsIgnoreCase(translation))).map(drivePath -> new LocationPreset(getDriveLocationString(accountPath, drivePath), drivePath)); + return directories.stream() + .filter(preset -> MY_DRIVE_TRANSLATIONS + .contains(preset.getFileName().toString())) + .map(drivePath -> new LocationPreset( + getDriveLocationString(accountPath, drivePath), + drivePath + )); } catch (IOException e) { return Stream.empty(); }