소스 검색

filter hidden directories

Jan-Peter Klein 10 달 전
부모
커밋
1946fc6c0e
1개의 변경된 파일7개의 추가작업 그리고 0개의 파일을 삭제
  1. 7 0
      src/main/java/org/cryptomator/common/locationpresets/GoogleDriveMacLocationPresetsProvider.java

+ 7 - 0
src/main/java/org/cryptomator/common/locationpresets/GoogleDriveMacLocationPresetsProvider.java

@@ -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();