You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mina.apache.org by "Guillaume Nodet (JIRA)" <ji...@apache.org> on 2014/04/14 13:39:18 UTC
[jira] [Updated] (SSHD-298) Windows: ScpClient.upload fails on
remote machine if path is absolute and begins with a drive letter
[ https://issues.apache.org/jira/browse/SSHD-298?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Guillaume Nodet updated SSHD-298:
---------------------------------
Fix Version/s: (was: 0.10.2)
0.11.0
> Windows: ScpClient.upload fails on remote machine if path is absolute and begins with a drive letter
> ----------------------------------------------------------------------------------------------------
>
> Key: SSHD-298
> URL: https://issues.apache.org/jira/browse/SSHD-298
> Project: MINA SSHD
> Issue Type: Bug
> Affects Versions: 0.10.1
> Environment: Windows
> Reporter: Gerrit Telkamp
> Assignee: Guillaume Nodet
> Fix For: 0.11.0
>
>
> When I try to copy a file using ScpClient.upload() to a remote machine using an absolute path that begins with a drive letter, the copy operation will fail:
> Exception in thread "main" java.io.IOException: Received nack: Can not write to /C:/Workspace/SSHTest/bin/C:/DOKUME~1/AUTOBU~1/LOKALE~1/Temp/testfile.txt
> (the current working directory was C:\Workspace\SSHTest\bin)
> When I use an absolute path that does not begin with a drive letter (e.g. "\DOKUME~1\AUTOBU~1\LOKALE~1\Temp\testfile.txt) the copy operation works.
> It seems that the windows client does not recognize paths beginning with a drive letter as absolute, so it assums a relative path and eppends it to the current directory (C:\Workspace\SSHTest\bin in this case).
> Below a piece of testcode:
> private ScpClient m_scp;
> private String srcFile = "testfile.txt";
> private String dstFile = "C:\\DOKUME~1\\AUTOBU~1\\LOKALE~1\\Temp\\testfile.txt";
> m_scp = m_session.createScpClient();
> m_scp.upload(srcFile, dstFile);
--
This message was sent by Atlassian JIRA
(v6.2#6252)