[ https://issues.apache.org/jira/browse/SSHD-305?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13950435#comment-13950435 ]
Markus Duft commented on SSHD-305: ---------------------------------- tested, sadly there is no improvement...: Connected to 172.28.8.175. sftp> ls bin lib src sftp> ls -la -rwxrwxrwx 1 rex rex 700 Mar 28 07:22 .classpath -rwxrwxrwx 1 rex rex 5 Mar 18 09:08 .gitignore -rwxrwxrwx 1 rex rex 371 Mar 18 09:08 .project drwxrwxrwx 1 rex rex 0 Mar 18 09:08 .settings drwxrwxrwx 1 rex rex 0 Mar 28 07:22 bin drwxrwxrwx 1 rex rex 4096 Mar 28 07:21 lib drwxrwxrwx 1 rex rex 0 Mar 24 16:16 src sftp> pwd Remote working directory: /C:/REX/workspace/rex/at.mduft.rex sftp> cd ../../../../ sftp> pwd Remote working directory: /C: sftp> ls Couldn't read directory: Failure sftp> > SFTP: wrong directory contents read on windows when cd'ing to root (C:) > ----------------------------------------------------------------------- > > Key: SSHD-305 > URL: https://issues.apache.org/jira/browse/SSHD-305 > Project: MINA SSHD > Issue Type: Bug > Environment: MINA SSHD on Windows 8.1, Oracle JDK7 > Reporter: Markus Duft > Labels: SFTP > Attachments: sshd-core-0.11.0-SNAPSHOT.jar > > Original Estimate: 4h > Remaining Estimate: 4h > > When connecting to the SFTP subsystem running on a windows server, directory > listing for the root directory (C:) in my case is wrong/does not work. > Actually, the response is "Failure" due to an IOException. I debugged it a > little, and my finding is, that in the end in > org.apache.sshd.common.file.nativefs.NativeFileSystemView.getFile(String, > String) it instantiates a new File("/C:"). This however does not do what is > expected it seems. calling .list() on this File lists the contents of the > current working directory of ther server! > This results in a wrong file list, and as soon as > org.apache.sshd.server.sftp.SftpSubsystem.writeAttrs(Buffer, SshFile, > boolean) tries to read attributes for those files, it will throw an > IOException: > java.io.FileNotFoundException: /C:/.classpath > at > org.apache.sshd.server.sftp.SftpSubsystem.writeAttrs(SftpSubsystem.java:973) > at > org.apache.sshd.server.sftp.SftpSubsystem.sendName(SftpSubsystem.java:840) > at > org.apache.sshd.server.sftp.SftpSubsystem.process(SftpSubsystem.java:615) > at org.apache.sshd.server.sftp.SftpSubsystem.run(SftpSubsystem.java:334) > at java.lang.Thread.run(Thread.java:724) > As you can see the not found file is C:\.classpath which clearly does not > exist, but $(PWD)/.classpath does exist, as the server runs from the plugin > i'm developing in eclipse. -- This message was sent by Atlassian JIRA (v6.2#6252)