Map drives only on windows. Caused exceptions on OS X

This commit is contained in:
Brian Carrier 2016-03-22 23:41:18 -04:00
parent a2c6225dca
commit bca4477384

View File

@ -263,6 +263,11 @@ public class UNCPathUtilities {
*/ */
synchronized private Map<String, String> getMappedDrives() { synchronized private Map<String, String> getMappedDrives() {
Map<String, String> driveMap = new HashMap<>(); Map<String, String> driveMap = new HashMap<>();
if (PlatformUtil.isWindowsOS() == false) {
return driveMap;
}
File mappedDrive = Paths.get(System.getenv(TEMP_FOLDER), nameString + MAPPED_DRIVES).toFile(); File mappedDrive = Paths.get(System.getenv(TEMP_FOLDER), nameString + MAPPED_DRIVES).toFile();
try { try {
Files.deleteIfExists(mappedDrive.toPath()); Files.deleteIfExists(mappedDrive.toPath());