diff --git a/filesystem/filesystem.go b/filesystem/filesystem.go index a11f9086..ee332c8d 100644 --- a/filesystem/filesystem.go +++ b/filesystem/filesystem.go @@ -528,7 +528,7 @@ func (m *Mount) listDirectory(directoryPath string) ([]string, error) { return nil, err } - var descriptors []string + descriptors := make([]string, 0, len(names)) for _, name := range names { // Be sure to include links as well descriptors = append(descriptors, strings.TrimSuffix(name, linkFileExtension))