diff options
author | Christian Georgi | 2015-04-02 14:36:09 +0000 |
---|---|---|
committer | Pascal Rapicault | 2015-04-27 19:07:54 +0000 |
commit | da1011ffc7f2b2efaa645c3eadfed2ec1bfd6381 (patch) | |
tree | 0544b71961b696923b122266cf254cad4e6b3e21 | |
parent | 1607d4214ca0e6ca882f251b3bbdb7fa33d0d2a4 (diff) | |
download | rt.equinox.p2-da1011ffc7f2b2efaa645c3eadfed2ec1bfd6381.tar.gz rt.equinox.p2-da1011ffc7f2b2efaa645c3eadfed2ec1bfd6381.tar.xz rt.equinox.p2-da1011ffc7f2b2efaa645c3eadfed2ec1bfd6381.zip |
Bug 431116 - Make MacOS launcher ini file computation more robustI20150428-0800I20150428-0100I20150427-2000
Sometimes, e.g. in Tycho tests that are p2 provisioned, the
launcherData's fwConfigLocation is not yet set, so the ini file
computation cannot rely on it. Use getFwPersistentDataLocation()
instead.
Bug: 431116
Change-Id: Iaba4c54b929709c67bc76f5fe074a7c1d8576024
Signed-off-by: Christian Georgi <christian.georgi@sap.com>
-rw-r--r-- | bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/EquinoxManipulatorImpl.java | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/EquinoxManipulatorImpl.java b/bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/EquinoxManipulatorImpl.java index f850c7c09..c91dd13ee 100644 --- a/bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/EquinoxManipulatorImpl.java +++ b/bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/EquinoxManipulatorImpl.java @@ -94,8 +94,14 @@ public class EquinoxManipulatorImpl implements Manipulator { if (dotLocation != -1) launcherName = launcherName.substring(0, dotLocation); File launcherFolder = launcher.getParentFile(); - if (org.eclipse.osgi.service.environment.Constants.OS_MACOSX.equals(launcherData.getOS())) - launcherFolder = launcherData.getFwConfigLocation().getParentFile(); + if (org.eclipse.osgi.service.environment.Constants.OS_MACOSX.equals(launcherData.getOS())) { + if (launcherData.getFwConfigLocation() != null) + launcherFolder = launcherData.getFwConfigLocation().getParentFile(); + else if (launcherData.getFwPersistentDataLocation() != null) + launcherFolder = launcherData.getFwPersistentDataLocation().getParentFile(); + else + throw new IllegalStateException("Not able to determine launcher ini file from " + launcherData); //$NON-NLS-1$ + } File result = new File(launcherFolder, launcherName + EquinoxConstants.INI_EXTENSION); return result; } |