fix the type, and we can pre-allocate the whole slice

This commit is contained in:
Cassondra Foesch 2021-08-02 11:58:16 +00:00
parent 94523b9b6f
commit 889ffcae88
1 changed files with 1 additions and 1 deletions

View File

@ -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{