From b471bc6b9f2a087e8bb8e3adc6e5d1b32e80db8d Mon Sep 17 00:00:00 2001
From: jvergara <jvergara@localhost>
Date: Wed, 07 Oct 2009 12:43:38 +0000
Subject: [PATCH] Fix for issue 4271 (control-panel: in remote mode, "Installation Path" is incorrect) Since using File when you have different OS in the control panel and in the managed server can be really problematic, use String instead in the ServerDescriptor object.
---
opends/src/guitools/org/opends/guitools/controlpanel/ui/BackupListPanel.java | 22 ++++++++++++++++------
1 files changed, 16 insertions(+), 6 deletions(-)
diff --git a/opends/src/guitools/org/opends/guitools/controlpanel/ui/BackupListPanel.java b/opends/src/guitools/org/opends/guitools/controlpanel/ui/BackupListPanel.java
index 8b9c8f3..34c557e 100644
--- a/opends/src/guitools/org/opends/guitools/controlpanel/ui/BackupListPanel.java
+++ b/opends/src/guitools/org/opends/guitools/controlpanel/ui/BackupListPanel.java
@@ -537,16 +537,26 @@
{
String path;
- File f = new File(desc.getInstancePath(),
- org.opends.quicksetup.Installation.BACKUPS_PATH_RELATIVE);
- try
+ if (desc.isLocal() || (desc.isWindows() == Utilities.isWindows()))
{
- path = f.getCanonicalPath();
+ File f = new File(desc.getInstancePath(),
+ org.opends.quicksetup.Installation.BACKUPS_PATH_RELATIVE);
+ try
+ {
+ path = f.getCanonicalPath();
+ }
+ catch (Throwable t)
+ {
+ path = f.getAbsolutePath();
+ }
}
- catch (Throwable t)
+ else
{
- path = f.getAbsolutePath();
+ String separator = desc.isWindows() ? "\\" : "/";
+ path = desc.getInstancePath() + separator +
+ org.opends.quicksetup.Installation.BACKUPS_PATH_RELATIVE;
}
+
final String fPath = path;
SwingUtilities.invokeLater(new Runnable()
{
--
Gitblit v1.10.0