Win32-OpenSSH icon indicating copy to clipboard operation
Win32-OpenSSH copied to clipboard

when sftp ls /. , it list /c:/ using sftp-server

Open tick-guo opened this issue 2 years ago • 2 comments
trafficstars

Prerequisites

  • [X] Write a descriptive title.
  • [X] Make sure you are able to repro it on the latest version
  • [X] Search the existing issues.

Steps to reproduce

  1. connect to sftp-server from cmd
  2. run cmd
    ls /.

Expected behavior

just list 
ls /
c:
d:
e:

Actual behavior

listed /c:/ files

Error details

No response

Environment data

not involved

Version

OpenSSH_for_Windows_9.2p1, LibreSSL 3.7.2

Visuals

微信截图_20230923133146

tick-guo avatar Sep 23 '23 05:09 tick-guo

I agree that ls /. over sftp prints the contents of the system drive directory. In a PowerShell session on the same machine (no sftp), ls /. also prints the contents of the system drive directory, so I think this is the expected behavior. Let me know if I am misunderstanding the issue.

tgauth avatar Sep 25 '23 20:09 tgauth

I agree that ls /. over sftp prints the contents of the system drive directory. In a PowerShell session on the same machine (no sftp), ls /. also prints the contents of the system drive directory, so I think this is the expected behavior. Let me know if I am misunderstanding the issue.

thinks reply. l hava the reasons,

  1. in a powershell ,cd /. will return current driver root , not always c: , but sftp will display c: anyway.
  2. in sftp dir style , / means root and . means current , so /. should goto /
  3. some sftp gui client always try /. to display root dir . and l can not see my files in other drivers anyway , that is just my face problem.

tick-guo avatar Sep 26 '23 00:09 tick-guo