mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

jvergara
26.54.2009 7e1890d56c0e399dcac30435968b5ad8f2032144
Fix for issue 3582 (Revert fails with "no valid existing backup locations")
The problem is that we are using a comparison of absolute paths instead of canonical paths to determine if the server has the same install and instance paths.
1 files modified
17 ■■■■■ changed files
opends/src/quicksetup/org/opends/quicksetup/Installation.java 17 ●●●●● patch | view | raw | blame | history
opends/src/quicksetup/org/opends/quicksetup/Installation.java
@@ -283,7 +283,7 @@
  public static final String WINDOWS_STATUSCLI_FILE_NAME = "status.bat";
  /**
   * Name of the file kept in the histoy directory containing logs
   * Name of the file kept in the history directory containing logs
   * of upgrade and reversions.
   */
  public static final String HISTORY_LOG_FILE_NAME = "log";
@@ -474,6 +474,20 @@
  public Installation(File rootDirectory, File instanceDirectory) {
    setRootDirectory(rootDirectory);
    setInstanceDirectory(instanceDirectory);
    try
    {
      if (rootDirectory.getCanonicalFile().
          equals(instanceDirectory.getCanonicalFile()))
      {
        instanceAndInstallInSameDir = true ;
      }
      else
      {
        instanceAndInstallInSameDir = false;
      }
    }
    catch (Throwable t)
    {
    if (rootDirectory.getAbsolutePath().
        equals(instanceDirectory.getAbsolutePath()))
    {
@@ -484,6 +498,7 @@
      instanceAndInstallInSameDir = false;
    }
  }
  }
  /**
   * Indicates if the install and instance are in the same directory.