33 lines
895 B
Diff
33 lines
895 B
Diff
diff --git a/internal/ftpd/handler.go b/internal/ftpd/handler.go
|
|
index 036c3977..33211261 100644
|
|
--- a/internal/ftpd/handler.go
|
|
+++ b/internal/ftpd/handler.go
|
|
@@ -169,7 +169,7 @@ func (c *Connection) Stat(name string) (os.FileInfo, error) {
|
|
}
|
|
return nil, err
|
|
}
|
|
- return fi, nil
|
|
+ return vfs.NewFileInfo(name, fi.IsDir(), fi.Size(), fi.ModTime(), false), nil
|
|
}
|
|
|
|
// Name returns the name of this connection
|
|
@@ -315,7 +315,17 @@ func (c *Connection) ReadDir(name string) (ftpserver.DirLister, error) {
|
|
}, nil
|
|
}
|
|
|
|
- return c.ListDir(name)
|
|
+ lister, err := c.ListDir(name)
|
|
+ if err != nil {
|
|
+ return nil, err
|
|
+ }
|
|
+ return &patternDirLister{
|
|
+ DirLister: lister,
|
|
+ pattern: "*",
|
|
+ lastCommand: c.clientContext.GetLastCommand(),
|
|
+ dirName: name,
|
|
+ connectionPath: c.clientContext.Path(),
|
|
+ }, nil
|
|
}
|
|
|
|
// GetHandle implements ClientDriverExtentionFileTransfer
|