due to change in type of winDriveLetters (from Character to Path) need addtional adjustment

This commit is contained in:
infeo
2019-07-04 14:07:21 +02:00
parent 67c29603da
commit 82ff5ddabe

View File

@@ -64,11 +64,11 @@ public class DokanyVolume implements Volume {
checkProvidedMountPoint(customMountPoint);
return customMountPoint;
} else if (!Strings.isNullOrEmpty(vaultSettings.winDriveLetter().get())) {
return Paths.get(vaultSettings.winDriveLetter().get().charAt(0) + ":\\");
return Path.of(vaultSettings.winDriveLetter().get().charAt(0) + ":\\");
} else {
//auto assign drive letter
if (!windowsDriveLetters.getAvailableDriveLetters().isEmpty()) {
return Paths.get(windowsDriveLetters.getAvailableDriveLetters().iterator().next() + ":\\");
return windowsDriveLetters.getAvailableDriveLetters().iterator().next();
} else {
throw new VolumeException("No free drive letter available.");
}