From a0c10ee7849cd73e5cecc046a669b73d7647d709 Mon Sep 17 00:00:00 2001
From: jvergara <jvergara@localhost>
Date: Thu, 15 Mar 2007 11:11:16 +0000
Subject: [PATCH] Fix for issue 1376.

---
 opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/uninstaller/Uninstaller.java |   32 ++++----------------------------
 1 files changed, 4 insertions(+), 28 deletions(-)

diff --git a/opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/uninstaller/Uninstaller.java b/opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/uninstaller/Uninstaller.java
index 4b8f2fa..10787f8 100644
--- a/opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/uninstaller/Uninstaller.java
+++ b/opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/uninstaller/Uninstaller.java
@@ -163,8 +163,7 @@
     {
       if (userData.getRemoveLibrariesAndTools())
       {
-        String[] arg = {getTab()+getQuicksetupJarPath()+
-            getLineBreak()+getTab()+getOpenDSJarPath()};
+        String[] arg = {getLibrariesPath()};
         successMsg = getMsg(
             "summary-uninstall-finished-successfully-remove-jarfiles-cli",
             arg);
@@ -178,8 +177,7 @@
     {
       if (userData.getRemoveLibrariesAndTools())
       {
-        String[] arg = {getTab()+getQuicksetupJarPath()+
-            getLineBreak()+getTab()+getOpenDSJarPath()};
+        String[] arg = {getLibrariesPath()};
         successMsg = getMsg(
             "summary-uninstall-finished-successfully-remove-jarfiles", arg);
       }
@@ -884,24 +882,6 @@
   }
 
   /**
-   * Returns the path to the quicksetup jar file.
-   * @return the path to the quicksetup jar file.
-   */
-  private String getQuicksetupJarPath()
-  {
-    return Utils.getPath(getLibrariesPath(), "quicksetup.jar");
-  }
-
-  /**
-   * Returns the path to the open ds jar file.
-   * @return the path to the open ds jar file.
-   */
-  private String getOpenDSJarPath()
-  {
-    return Utils.getPath(getLibrariesPath(), "OpenDS.jar");
-  }
-
-  /**
    * Returns the path to the backup files under the install path.
    * @return the path to the backup files under the install path.
    */
@@ -1162,8 +1142,6 @@
    */
   class InstallationFilesToDeleteFilter implements FileFilter
   {
-    File quicksetupFile = new File(getQuicksetupJarPath());
-    File openDSFile = new File(getOpenDSJarPath());
     File librariesFile = new File(getLibrariesPath());
 
     File installationPath = new File(Utils.getInstallPathFromClasspath());
@@ -1193,10 +1171,8 @@
       };
 
      boolean accept =
-          !installationPath.equals(file)
-              && !librariesFile.equals(file)
-              && !quicksetupFile.equals(file)
-              && !openDSFile.equals(file);
+          !installationPath.equals(file)&&
+          !equalsOrDescendant(file, librariesFile);
 
      for (int i=0; i<uData.length && accept; i++)
      {

--
Gitblit v1.10.0