[389-commits] src/com

Mark Reynolds mreynolds at fedoraproject.org
Wed Sep 3 17:47:32 UTC 2014


 src/com/netscape/admin/dirserv/panel/RestorePanel.java |   15 ++++++++++-----
 1 file changed, 10 insertions(+), 5 deletions(-)

New commits:
commit cbd0dc9f7f135cb713c319492b9fce66715fdfe3
Author: Mark Reynolds <mreynolds at redhat.com>
Date:   Wed Sep 3 10:52:56 2014 -0400

    Ticket 47485 - DS instance cannot be restored from remote console
    
    Bug Description:  You can perform a backup from a remote console, but you
                      can not restore a backup from a remote console.  This
                      is because the console tries to validate the backup
                      directory on the same machine that the console runs from.
    
    Fix Description:  Check if the console is running locally, if it's not then
                      do not validate the path/directory, and allow the "OK"
                      button to be enabled.
    
    https://fedorahosted.org/389/ticket/47485
    
    Reviewed by: rmeggins(Thanks!)

diff --git a/src/com/netscape/admin/dirserv/panel/RestorePanel.java b/src/com/netscape/admin/dirserv/panel/RestorePanel.java
index 9198a9e..f215c1b 100644
--- a/src/com/netscape/admin/dirserv/panel/RestorePanel.java
+++ b/src/com/netscape/admin/dirserv/panel/RestorePanel.java
@@ -250,12 +250,17 @@ public class RestorePanel extends BlankPanel {
 		if (_tfExport.getText().trim().equals("")) {
 			setOkay(false);
 		} else {
-			File f = new File(_tfExport.getText());
-			if (!f.exists()) { // Restore path must exist
-				setOkay(false);
-			} else if (!f.isDirectory()) { // Restore path must be a directory
-				setOkay(false);
+			if ( isLocal() ){
+				File f = new File(_tfExport.getText());
+				if (!f.exists()) { // Restore path must exist
+					setOkay(false);
+				} else if (!f.isDirectory()) { // Restore path must be a directory
+					setOkay(false);
+				} else {
+					setOkay(true);
+				}
 			} else {
+				// This is a remote session, let the server validate the path
 				setOkay(true);
 			}
 		}




More information about the 389-commits mailing list