summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rapicault (Ericsson)2013-01-18 13:51:54 (EST)
committerPascal Rapicault2013-01-18 14:01:56 (EST)
commitfefbc5bdec2ce6cdb7fd71b1790bf8abdee8737a (patch)
treed5339397dfcc34c0215325bfadf370d6007d75cf
parent3de6f8593d5c1b21be3bd21000e34acb945056b1 (diff)
downloadrt.equinox.p2-fefbc5bdec2ce6cdb7fd71b1790bf8abdee8737a.zip
rt.equinox.p2-fefbc5bdec2ce6cdb7fd71b1790bf8abdee8737a.tar.gz
rt.equinox.p2-fefbc5bdec2ce6cdb7fd71b1790bf8abdee8737a.tar.bz2
Fix bug in change detection logic
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/EquinoxFwConfigFileParser.java10
1 files changed, 7 insertions, 3 deletions
diff --git a/bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/EquinoxFwConfigFileParser.java b/bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/EquinoxFwConfigFileParser.java
index 6f21df7..7c0ea6b 100644
--- a/bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/EquinoxFwConfigFileParser.java
+++ b/bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/EquinoxFwConfigFileParser.java
@@ -214,9 +214,13 @@ public class EquinoxFwConfigFileParser {
// load shared configuration properties
Properties sharedConfigProperties = getSharedConfiguration(ParserUtils.getOSGiInstallArea(Arrays.asList(manipulator.getLauncherData().getProgramArgs()), props, manipulator.getLauncherData()), props.getProperty(EquinoxConstants.PROP_SHARED_CONFIGURATION_AREA));
if (sharedConfigProperties != null) {
- baseHasChanged = hasBasedChanged(inputFile, manipulator, props);
+ baseHasChanged = hasBaseChanged(inputFile, manipulator, props);
if (!baseHasChanged)
sharedConfigProperties.putAll(props);
+ else {
+ sharedConfigProperties.put("osgi.sharedConfiguration.area", props.get("osgi.sharedConfiguration.area"));
+ }
+
props = sharedConfigProperties;
}
@@ -244,7 +248,7 @@ public class EquinoxFwConfigFileParser {
Log.log(LogService.LOG_INFO, NLS.bind(Messages.log_configFile, inputFile.getAbsolutePath()));
}
- private boolean hasBasedChanged(File configIni, Manipulator manipulator, Properties configProps) {
+ private boolean hasBaseChanged(File configIni, Manipulator manipulator, Properties configProps) {
LauncherData launcherData = manipulator.getLauncherData();
File sharedConfigIni = findSharedConfigIniFile(ParserUtils.getOSGiInstallArea(Arrays.asList(launcherData.getProgramArgs()), configProps, launcherData), configProps.getProperty(EquinoxConstants.PROP_SHARED_CONFIGURATION_AREA));
File timestampFile = new File(configIni.getParentFile(), BASE_TIMESTAMP_FILE_CONFIGINI);
@@ -256,7 +260,7 @@ public class EquinoxFwConfigFileParser {
} catch (IOException e) {
return false;
}
- return String.valueOf(sharedConfigIni.lastModified()).equals(timestamps.getProperty(KEY_CONFIGINI_TIMESTAMP));
+ return !String.valueOf(sharedConfigIni.lastModified()).equals(timestamps.getProperty(KEY_CONFIGINI_TIMESTAMP));
}
private void readDefaultStartLevel(ConfigData configData, Properties props) {