mirror of https://github.com/pkg/sftp.git
fix the type, and we can pre-allocate the whole slice
This commit is contained in:
parent
94523b9b6f
commit
889ffcae88
|
@ -503,7 +503,7 @@ func filelist(h FileLister, r *Request, pkt requestPacket) responsePacket {
|
|||
return statusFromError(pkt.id(), err)
|
||||
}
|
||||
|
||||
var nameAttrs []sshFxpNameAttr
|
||||
nameAttrs := make([]*sshFxpNameAttr, 0, len(finfo))
|
||||
|
||||
for _, fi := range finfo {
|
||||
nameAttrs = append(nameAttrs, &sshFxpNameAttr{
|
||||
|
|
Loading…
Reference in New Issue