Bug 431983 - Resource test failures on Windows 7 with Java 7 filesystem fragment

Change-Id: I5b9861455c1f0205f02c3bd4e94f6403491793d9
Signed-off-by: Szymon Ptaszkiewicz <szymon.ptaszkiewicz@pl.ibm.com>
diff --git a/bundles/org.eclipse.core.filesystem.java7/src/org/eclipse/core/internal/filesystem/java7/Java7Handler.java b/bundles/org.eclipse.core.filesystem.java7/src/org/eclipse/core/internal/filesystem/java7/Java7Handler.java
index 443a093..d8f5f9e 100644
--- a/bundles/org.eclipse.core.filesystem.java7/src/org/eclipse/core/internal/filesystem/java7/Java7Handler.java
+++ b/bundles/org.eclipse.core.filesystem.java7/src/org/eclipse/core/internal/filesystem/java7/Java7Handler.java
@@ -109,6 +109,14 @@
 
 		else if (DOS) {
 			try {
+				if (!exists) {
+					return info;
+				}
+
+				// use canonical file to get the correct case of filename
+				String canonicalName = new File(fileName).getCanonicalFile().getName();
+				info.setName(canonicalName);
+
 				// To be consistent with the native implementation we do not follow a symbolic link
 				//  and return back the information about the target. Instead, we provide the information
 				//  about the symbolic link itself whether it exists or not.