mirror of
https://github.com/drakkan/sftpgo.git
synced 2025-12-07 06:40:54 +03:00
sftpd: remove unused folder prefix from Connection struct
Signed-off-by: Nicola Murino <nicola.murino@gmail.com>
This commit is contained in:
@@ -41,7 +41,6 @@ type Connection struct {
|
|||||||
LocalAddr net.Addr
|
LocalAddr net.Addr
|
||||||
channel io.ReadWriteCloser
|
channel io.ReadWriteCloser
|
||||||
command string
|
command string
|
||||||
folderPrefix string
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// GetClientVersion returns the connected client's version
|
// GetClientVersion returns the connected client's version
|
||||||
@@ -221,7 +220,7 @@ func (c *Connection) Filelist(request *sftp.Request) (sftp.ListerAt, error) {
|
|||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
modTime := time.Unix(0, 0)
|
modTime := time.Unix(0, 0)
|
||||||
if request.Filepath != "/" || c.folderPrefix != "" {
|
if request.Filepath != "/" {
|
||||||
lister.Add(vfs.NewFileInfo("..", true, 0, modTime, false))
|
lister.Add(vfs.NewFileInfo("..", true, 0, modTime, false))
|
||||||
}
|
}
|
||||||
lister.Add(vfs.NewFileInfo(".", true, 0, modTime, false))
|
lister.Add(vfs.NewFileInfo(".", true, 0, modTime, false))
|
||||||
|
|||||||
Reference in New Issue
Block a user