Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDJ Houghton2008-09-29 19:02:12 +0000
committerDJ Houghton2008-09-29 19:02:12 +0000
commitb93c2053cca07d37c5b85ec4151dd6899049015c (patch)
treed0dcdd25879f3b34c1ecc4738817f48a80701979 /bundles/org.eclipse.equinox.simpleconfigurator.manipulator
parentbc64bdac902ef7fe7d01cd4cb0adbe87a6f548f7 (diff)
downloadrt.equinox.p2-b93c2053cca07d37c5b85ec4151dd6899049015c.tar.gz
rt.equinox.p2-b93c2053cca07d37c5b85ec4151dd6899049015c.tar.xz
rt.equinox.p2-b93c2053cca07d37c5b85ec4151dd6899049015c.zip
Bug 247095 - p2 reconciler not deleting lines associated with removed features/plugins/sites from USER-INCLUDE sites in platform.xml from bundles.info
Diffstat (limited to 'bundles/org.eclipse.equinox.simpleconfigurator.manipulator')
-rw-r--r--bundles/org.eclipse.equinox.simpleconfigurator.manipulator/src/org/eclipse/equinox/internal/simpleconfigurator/manipulator/SimpleConfiguratorManipulatorImpl.java11
1 files changed, 10 insertions, 1 deletions
diff --git a/bundles/org.eclipse.equinox.simpleconfigurator.manipulator/src/org/eclipse/equinox/internal/simpleconfigurator/manipulator/SimpleConfiguratorManipulatorImpl.java b/bundles/org.eclipse.equinox.simpleconfigurator.manipulator/src/org/eclipse/equinox/internal/simpleconfigurator/manipulator/SimpleConfiguratorManipulatorImpl.java
index 49996743d..0173d898a 100644
--- a/bundles/org.eclipse.equinox.simpleconfigurator.manipulator/src/org/eclipse/equinox/internal/simpleconfigurator/manipulator/SimpleConfiguratorManipulatorImpl.java
+++ b/bundles/org.eclipse.equinox.simpleconfigurator.manipulator/src/org/eclipse/equinox/internal/simpleconfigurator/manipulator/SimpleConfiguratorManipulatorImpl.java
@@ -528,7 +528,16 @@ public class SimpleConfiguratorManipulatorImpl implements ConfiguratorManipulato
return urlString;
String rootString = rootURL.toExternalForm();
- return urlString.substring(0, index) + makeRelative(new Path(urlString.substring(index)), new Path(rootString.substring(rootString.indexOf(FILE_PROTOCOL) + 5)));
+ IPath one = new Path(urlString.substring(index));
+ IPath two = new Path(rootString.substring(rootString.indexOf(FILE_PROTOCOL) + 5));
+ String deviceOne = one.getDevice();
+ String deviceTwo = two.getDevice();
+ // do checking here because we want to return the exact string we got initially if
+ // we are unable to make it relative.
+ if (deviceOne != deviceTwo && (deviceOne == null || !deviceOne.equalsIgnoreCase(two.getDevice())))
+ return urlString;
+
+ return urlString.substring(0, index) + makeRelative(one, two);
}
public static String makeAbsolute(String original, String rootPath) {

Back to the top