mina-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Guillaume Nodet (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (SSHD-298) Windows: ScpClient.upload fails on remote machine if path is absolute and begins with a drive letter
Date Mon, 17 Mar 2014 16:57:43 GMT

     [ https://issues.apache.org/jira/browse/SSHD-298?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Guillaume Nodet resolved SSHD-298.
----------------------------------

       Resolution: Fixed
    Fix Version/s: 0.11.0
         Assignee: Guillaume Nodet

https://git-wip-us.apache.org/repos/asf?p=mina-sshd.git;a=commit;h=c8fcdd4618902224e7a92061696196bab69d1128

> 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)

Mime
View raw message