Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/ChooseWorkspaceData.java7
1 files changed, 5 insertions, 2 deletions
diff --git a/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/ChooseWorkspaceData.java b/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/ChooseWorkspaceData.java
index 7215ec4719b..64d46f3c0a8 100644
--- a/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/ChooseWorkspaceData.java
+++ b/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/ChooseWorkspaceData.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2004, 2009 IBM Corporation and others.
+ * Copyright (c) 2004, 2013 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -222,10 +222,13 @@ public class ChooseWorkspaceData {
// move the new selection to the front of the list
if (selection != null) {
+ File newFolder = new File(selection);
String oldEntry = recentWorkspaces[0];
recentWorkspaces[0] = selection;
for (int i = 1; i < recentWorkspaces.length && oldEntry != null; ++i) {
- if (selection.equals(oldEntry)) {
+ File oldFolder = new File (oldEntry);
+ // If selection represents a file location we already have, don't store it
+ if (newFolder.compareTo(oldFolder) == 0){
break;
}
String tmp = recentWorkspaces[i];

Back to the top