modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/install/remote/SSHFileSend.java
| 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
New commits:
commit 70db4e046ee011b5766d5bce6d1890f4f2d8391f
Author: John Mazzitelli <mazz(a)redhat.com>
Date: Tue Jul 2 13:48:30 2013 -0400
BZ 976227 - strip the file name from a Windows path
diff --git
a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/install/remote/SSHFileSend.java
b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/install/remote/SSHFileSend.java
index ece76af..7eb513a 100644
---
a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/install/remote/SSHFileSend.java
+++
b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/install/remote/SSHFileSend.java
@@ -22,16 +22,16 @@
*/
package org.rhq.enterprise.server.install.remote;
-import com.jcraft.jsch.Channel;
-import com.jcraft.jsch.ChannelExec;
-import com.jcraft.jsch.Session;
-
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
+import com.jcraft.jsch.Channel;
+import com.jcraft.jsch.ChannelExec;
+import com.jcraft.jsch.Session;
+
/**
* @author Greg Hinkle
*/
@@ -61,6 +61,8 @@ public class SSHFileSend {
command = "C0644 " + filesize + " ";
if (sourceFilename.lastIndexOf('/') > 0) {
command +=
sourceFilename.substring(sourceFilename.lastIndexOf('/') + 1);
+ } else if (sourceFilename.lastIndexOf('\\') > 0) {
+ command +=
sourceFilename.substring(sourceFilename.lastIndexOf('\\') + 1);
} else {
command += sourceFilename;
}
Show replies by date