UriUtil.normalize did not properly ensure that drive-letters on windows are canonically represented (i.e allways in upper-case or allways in lower-case).
This commit is contained in:
@@ -74,4 +74,9 @@ public class JavaProject implements IJavaProject, Disposable {
|
||||
public boolean exists() {
|
||||
return new File(uri).exists();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "JavaProject("+uri+")";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -28,7 +28,7 @@ public class UriUtil {
|
||||
public static String normalize(String uriVal) {
|
||||
try {
|
||||
if (uriVal != null && uriVal.startsWith("file:")) {
|
||||
File file = new File(URI.create(uriVal));
|
||||
File file = new File(URI.create(uriVal)).getCanonicalFile();
|
||||
uriVal = file.toURI().toString();
|
||||
//Careful!!! If the project uri points to a existing project... then it will be
|
||||
//a directory and then the uri we computed will get a slash at the end.
|
||||
@@ -39,6 +39,7 @@ public class UriUtil {
|
||||
while (uriVal.endsWith("/")) {
|
||||
uriVal = uriVal.substring(0, uriVal.length()-1);
|
||||
}
|
||||
//Careful on windows, drive letters
|
||||
return uriVal;
|
||||
}
|
||||
} catch (Exception e) {
|
||||
|
||||
Reference in New Issue
Block a user