From 2e08d2c0e9bede644be993ddaa28157c9f156c10 Mon Sep 17 00:00:00 2001
From: Violette Roche-Montane <violette.roche-montane@forgerock.com>
Date: Tue, 07 May 2013 13:50:59 +0000
Subject: [PATCH] svn merge https://svn.forgerock.org/opendj/trunk/opends@8851 https://svn.forgerock.org/opendj/branches/native-packaging@8851 .
---
opends/src/quicksetup/org/opends/quicksetup/CurrentInstallStatus.java | 23 +++++++++++------------
1 files changed, 11 insertions(+), 12 deletions(-)
diff --git a/opends/src/quicksetup/org/opends/quicksetup/CurrentInstallStatus.java b/opends/src/quicksetup/org/opends/quicksetup/CurrentInstallStatus.java
index 27f9060..315db5c 100644
--- a/opends/src/quicksetup/org/opends/quicksetup/CurrentInstallStatus.java
+++ b/opends/src/quicksetup/org/opends/quicksetup/CurrentInstallStatus.java
@@ -23,7 +23,7 @@
*
*
* Copyright 2006-2008 Sun Microsystems, Inc.
- * Portions copyright 2012 ForgeRock AS.
+ * Portions copyright 2012-2013 ForgeRock AS.
*/
package org.opends.quicksetup;
@@ -73,7 +73,6 @@
} else
{
Installation installation = Installation.getLocal();
- boolean dbFileExists = false;
ArrayList<Message> msgs = new ArrayList<Message>();
if (installation.getStatus().isServerRunning())
@@ -84,17 +83,17 @@
if (dbFilesExist())
{
- dbFileExists = true;
+ canOverwriteCurrentInstall = true;
msgs.add(INFO_INSTALLSTATUS_DBFILEEXIST.get());
}
- if (archivedConfigsExist())
+ if (configExists())
{
+ canOverwriteCurrentInstall = false;
+ isInstalled = true;
msgs.add(INFO_INSTALLSTATUS_CONFIGFILEMODIFIED.get());
}
- canOverwriteCurrentInstall = (msgs.size() == 1) && dbFileExists;
- isInstalled = msgs.size() > 0;
if (canOverwriteCurrentInstall)
{
installationMsg = !Utils.isCli()?
@@ -110,7 +109,7 @@
for (Message msg : msgs)
{
buf.append(Constants.LINE_SEPARATOR);
- buf.append("- "+msg);
+ buf.append("- ").append(msg);
}
String cmd = Utils.isWindows() ?
Installation.WINDOWS_SETUP_FILE_NAME :
@@ -202,15 +201,15 @@
/**
- * Indicates whether there are archived config files under this installation.
+ * Indicates whether there are config files under this installation.
*
- * @return <CODE>true</CODE> if there are archived config files, or
+ * @return <CODE>true</CODE> if there are configuration files, or
* <CODE>false</CODE> if not.
*/
- private boolean archivedConfigsExist()
+ private boolean configExists()
{
- File archDir = Installation.getLocal().getArchivedConfigsDirectory();
- File[] children = archDir.listFiles();
+ File configDir = Installation.getLocal().getConfigurationDirectory();
+ File[] children = configDir.listFiles();
return ((children != null) && (children.length > 0));
}
--
Gitblit v1.10.0