From 7761b1eaf5ba3d52a67e0217d8707cb4940dcedb Mon Sep 17 00:00:00 2001
From: kenneth_suter <kenneth_suter@localhost>
Date: Fri, 22 Jun 2007 18:17:44 +0000
Subject: [PATCH] Fixes problem with Windows uninstaller in which an attempt is made to delete JAR files for which it does not have permission.

---
 opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/util/Utils.java              |   34 ----------------------------------
 opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/uninstaller/Uninstaller.java |    6 +++---
 2 files changed, 3 insertions(+), 37 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 b03fefa..d8777f4 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
@@ -868,8 +868,7 @@
   }
 
   private boolean equalsOrDescendant(File file, File directory) {
-    return file.equals(directory) ||
-            Utils.isDescendant(file.toString(), directory.toString());
+    return file.equals(directory) || Utils.isDescendant(file, directory);
   }
 
   /**
@@ -882,7 +881,8 @@
     File quicksetupFile = installation.getQuicksetupJarFile();
     File openDSFile = installation.getOpenDSJarFile();
     File librariesFile = installation.getLibrariesDirectory();
-
+    File activationFile = new File(librariesFile, "activation.jar");
+    File aspectRuntimeFile = new File(librariesFile, "aspectjrt.jar");
     File uninstallBatFile = installation.getUninstallBatFile();
 
     File installationPath = installation.getRootDirectory();
diff --git a/opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/util/Utils.java b/opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/util/Utils.java
index 1b51479..5e0ae68 100644
--- a/opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/util/Utils.java
+++ b/opendj-sdk/opends/src/quicksetup/org/opends/quicksetup/util/Utils.java
@@ -205,40 +205,6 @@
    * @param descendant the descendant candidate path.
    * @param path the path.
    * @return <CODE>true</CODE> if the first provided path is under the second
-   * path in the file system.
-   */
-  public static boolean isDescendant(String descendant, String path)
-  {
-    File f1;
-    File f2;
-
-    try
-    {
-      f1 = (new File(path)).getCanonicalFile();
-    }
-    catch (IOException ioe)
-    {
-      f1 = new File(path);
-    }
-
-    try
-    {
-      f2 = (new File(descendant)).getCanonicalFile();
-    }
-    catch (IOException ioe)
-    {
-      f2 = new File(descendant);
-    }
-    return isDescendant(f1, f2);
-  }
-
-
-  /**
-   * Returns <CODE>true</CODE> if the first provided path is under the second
-   * path in the file system.
-   * @param descendant the descendant candidate path.
-   * @param path the path.
-   * @return <CODE>true</CODE> if the first provided path is under the second
    * path in the file system; <code>false</code> otherwise or if
    * either of the files are null
    */

--
Gitblit v1.10.0