Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrey Loskutov2015-09-13 17:19:51 +0000
committerAndrey Loskutov2015-09-13 17:19:51 +0000
commitfbb66bdb00b81fc817d9ecd4eed70d4e7d2b4a3e (patch)
tree0fd59f9e697a48dcdddbcbef63eed7da08bcda48 /org.eclipse.egit.core/src/org/eclipse/egit/core
parent56529a0c680910d78ab672f630aabad3226879ab (diff)
downloadegit-fbb66bdb00b81fc817d9ecd4eed70d4e7d2b4a3e.tar.gz
egit-fbb66bdb00b81fc817d9ecd4eed70d4e7d2b4a3e.tar.xz
egit-fbb66bdb00b81fc817d9ecd4eed70d4e7d2b4a3e.zip
Don't use IPath.equals() since it is broken on Windows
C:\\test and c:\\test are different paths for IPath.equals(). So if we search for repositories, we cannot rely on it's implementation and should compare java.io.File instances instead. Bug: 475453 Change-Id: I9ec19dc3cc31b4717db5a6348cb84a9d4e7751ae Signed-off-by: Andrey Loskutov <loskutov@gmx.de>
Diffstat (limited to 'org.eclipse.egit.core/src/org/eclipse/egit/core')
-rw-r--r--org.eclipse.egit.core/src/org/eclipse/egit/core/op/ConnectProviderOperation.java8
1 files changed, 6 insertions, 2 deletions
diff --git a/org.eclipse.egit.core/src/org/eclipse/egit/core/op/ConnectProviderOperation.java b/org.eclipse.egit.core/src/org/eclipse/egit/core/op/ConnectProviderOperation.java
index 73b0a13514..6202f55a60 100644
--- a/org.eclipse.egit.core/src/org/eclipse/egit/core/op/ConnectProviderOperation.java
+++ b/org.eclipse.egit.core/src/org/eclipse/egit/core/op/ConnectProviderOperation.java
@@ -219,9 +219,13 @@ public class ConnectProviderOperation implements IEGitOperation {
@Nullable
private RepositoryMapping findActualRepository(
Collection<RepositoryMapping> repos, File suggestedRepo) {
- IPath path = Path.fromOSString(suggestedRepo.getPath());
+ File path = Path.fromOSString(suggestedRepo.getPath()).toFile();
for (RepositoryMapping rm : repos) {
- if (path.equals(rm.getGitDirAbsolutePath())) {
+ IPath other = rm.getGitDirAbsolutePath();
+ if (other == null) {
+ continue;
+ }
+ if (path.equals(other.toFile())) {
return rm;
}
}

Back to the top