diff options
Diffstat (limited to 'lib/ssh')
| -rw-r--r-- | lib/ssh/sftp/client.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/ssh/sftp/client.go b/lib/ssh/sftp/client.go index 215bf406..47364f4f 100644 --- a/lib/ssh/sftp/client.go +++ b/lib/ssh/sftp/client.go @@ -580,7 +580,13 @@ func (cl *Client) Setstat(remoteFile string, fa *FileAttrs) (err error) { // Stat get the file attributes based on the remote file path. // This method follow symbolic links. +// +// To stat the user's home directory pass empty string or '.' in remoteFile +// parameter. func (cl *Client) Stat(remoteFile string) (fa *FileAttrs, err error) { + if remoteFile == `` { + remoteFile = `.` + } var ( logp = "Stat" req = cl.generatePacket() |
