Parcourir la source

Updating WinDriveLetters since Dokany be installed in version 1.3.x

Armin Schrenk il y a 5 ans
Parent
commit
ca73c3ad90

+ 4 - 4
main/commons/src/main/java/org/cryptomator/common/vaults/WindowsDriveLetters.java

@@ -23,11 +23,11 @@ import java.util.stream.StreamSupport;
 public final class WindowsDriveLetters {
 
 	private static final Logger LOG = LoggerFactory.getLogger(WindowsDriveLetters.class);
-	private static final Set<Path> D_TO_Z;
+	private static final Set<Path> A_TO_Z;
 
 	static {
-		try (IntStream stream = IntStream.rangeClosed('D', 'Z')) {
-			D_TO_Z = stream.mapToObj(i -> Path.of(((char) i)+":\\")).collect(Collectors.toSet());
+		try (IntStream stream = IntStream.rangeClosed('A', 'Z')) {
+			A_TO_Z = stream.mapToObj(i -> Path.of(((char) i)+":\\")).collect(Collectors.toSet());
 		}
 	}
 
@@ -48,7 +48,7 @@ public final class WindowsDriveLetters {
 	public Set<Path> getAvailableDriveLetters() {
 		Set<Path> occupiedDriveLetters = getOccupiedDriveLetters();
 		Predicate<Path> isOccupiedDriveLetter = occupiedDriveLetters::contains;
-		return D_TO_Z.stream().filter(isOccupiedDriveLetter.negate()).collect(Collectors.toSet());
+		return A_TO_Z.stream().filter(isOccupiedDriveLetter.negate()).collect(Collectors.toSet());
 	}
 
 }