diff options
author | DJ Houghton | 2009-03-07 16:10:10 +0000 |
---|---|---|
committer | DJ Houghton | 2009-03-07 16:10:10 +0000 |
commit | 17daddf16cc8fa35c60c7fa33234fd27bafaa9b8 (patch) | |
tree | 76f9c3f95f4786027121fde10226bbe3a94e8977 | |
parent | 676798d3e464d74bff2868224c0d2eda91101fc3 (diff) | |
download | rt.equinox.p2-17daddf16cc8fa35c60c7fa33234fd27bafaa9b8.tar.gz rt.equinox.p2-17daddf16cc8fa35c60c7fa33234fd27bafaa9b8.tar.xz rt.equinox.p2-17daddf16cc8fa35c60c7fa33234fd27bafaa9b8.zip |
Bug 265340 - p2 does not reconcile correctly when the configuration location and the bundle locations are under different directory trees.v20090307-1115
-rw-r--r-- | bundles/org.eclipse.equinox.simpleconfigurator.manipulator/src/org/eclipse/equinox/internal/simpleconfigurator/manipulator/SimpleConfiguratorManipulatorImpl.java | 14 |
1 files changed, 12 insertions, 2 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 7e35e66f2..11c2cd5da 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 @@ -364,9 +364,19 @@ public class SimpleConfiguratorManipulatorImpl implements ConfiguratorManipulato } else tok.nextToken(); // , try { + // handle the case where we have an absolute path on Windows + // with a device and it may or may not have an extra slash at + // the beginning. e.g. this should handle both file:c:/foo and file:/c:/foo, + // returning file:/c:/foo for both. + if (urlSt.startsWith(FILE_PROTOCOL)) { + urlSt = urlSt.substring(5); + if (urlSt.charAt(0) != '/') { + if (new Path(urlSt).getDevice() != null) + urlSt = '/' + urlSt; + } + urlSt = FILE_PROTOCOL + urlSt; + } new URL(urlSt); - // if (DEBUG) - // System.out.println("1 urlSt=" + urlSt); } catch (MalformedURLException e) { urlSt = Utils.getUrlInFull(urlSt, baseUrl).toExternalForm(); // if (DEBUG) |