pkg / sftp

SFTP support for the go.crypto/ssh package
BSD 2-Clause "Simplified" License
1.49k stars 379 forks source link

Question about getwd() method #543

Open SwagLYY opened 1 year ago

SwagLYY commented 1 year ago

background : I’m using request-server Server() and overwrite Filelist method,

I'm trying to get the current working directory of the sftp server, but every time i call getwd() method get same result "/root" ,i wannna know what’s the point to influence this result

puellanivis commented 1 year ago

So, getwd is in sftp just an alias for sshfx.RealPathPacket{ Path: "." }. So, if you override the Filelist method, you will also need to implement sftp.RealPathFileLister as well.