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

jvergara
13.20.2009 e0282ec33fe1e11be327f48281306335aee50014
Fix for issue 4274 (ZIP package control-panel displays both installation path and instance path)

Do the same as is done for the instance path with the install root: try to use File.getCanonicalPath to avoid having relative paths (../..). Since this is done only once when the config file handler is created, there is no performance impact.
1 files modified
14 ■■■■■ changed files
opends/src/server/org/opends/server/extensions/ConfigFileHandler.java 14 ●●●●● patch | view | raw | blame | history
opends/src/server/org/opends/server/extensions/ConfigFileHandler.java
@@ -735,7 +735,19 @@
    }
    else
    {
      serverRoot = rootFile.getAbsolutePath();
      /*
       * Do a best effort to avoid having a relative representation (for
       * instance to avoid having ../../../).
       */
      try
      {
        serverRoot = rootFile.getCanonicalPath();
      }
      catch (IOException ioe)
      {
        // Best effort
        serverRoot = rootFile.getAbsolutePath();
      }
    }
    // Determine the appropriate server root.  If it's not defined in the