aboutsummaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCacheCheckout.java
diff options
context:
space:
mode:
authorRobin Rosenberg <robin.rosenberg@dewire.com>2012-05-20 10:45:03 +0200
committerRobin Rosenberg <robin.rosenberg@dewire.com>2012-06-06 01:14:19 +0200
commit20c33e6b0c4d5282f68b0e96b2e1a42cf5e9bb20 (patch)
tree07de12346da8da07634483c09c0efcf5a62e035d /org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCacheCheckout.java
parentb61d35e848e637ef85fde4ebe95d60ced171e963 (diff)
downloadjgit-20c33e6b0c4d5282f68b0e96b2e1a42cf5e9bb20.tar.gz
jgit-20c33e6b0c4d5282f68b0e96b2e1a42cf5e9bb20.zip
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
Diffstat (limited to 'org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCacheCheckout.java')
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCacheCheckout.java7
1 files changed, 3 insertions, 4 deletions
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCacheCheckout.java b/org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCacheCheckout.java
index 22a8558328..4c29886346 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCacheCheckout.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCacheCheckout.java
@@ -1015,10 +1015,9 @@ public class DirCacheCheckout {
}
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();