Make FS OS X detection work for OpenJDK
OpenJDK sets the os.name system.property to "Darwin", while Apple's version says "Mac OS X". Change-Id: If08f8e7b8ef94ec00023a3f78bbf502ebd9699fb
This commit is contained in:
parent
b61d35e848
commit
20c33e6b0c
|
@ -1015,10 +1015,9 @@ private static boolean isValidPath(CanonicalTreeParser t) {
|
|||
}
|
||||
|
||||
private static boolean isValidPathSegment(CanonicalTreeParser t) {
|
||||
boolean isWindows = "Windows".equals(SystemReader.getInstance()
|
||||
.getProperty("os.name"));
|
||||
boolean isOSX = "Mac OS X".equals(SystemReader.getInstance()
|
||||
.getProperty("os.name"));
|
||||
String osName = SystemReader.getInstance().getProperty("os.name");
|
||||
boolean isWindows = "Windows".equals(osName);
|
||||
boolean isOSX = "Darwin".equals(osName) || "Mac OS X".equals(osName);
|
||||
boolean ignCase = isOSX || isWindows;
|
||||
|
||||
int ptr = t.getNameOffset();
|
||||
|
|
|
@ -105,6 +105,6 @@ public String run() {
|
|||
return System.getProperty("os.name");
|
||||
}
|
||||
});
|
||||
return "Mac OS X".equals(osDotName);
|
||||
return "Mac OS X".equals(osDotName) || "Darwin".equals(osDotName);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue