diff --git a/nav.go b/nav.go index 95acee8..1bc6423 100644 --- a/nav.go +++ b/nav.go @@ -91,6 +91,8 @@ func readdir(path string) ([]*file, error) { } names, err := f.Readdirnames(-1) + f.Close() + fi := make([]*file, 0, len(names)) for _, filename := range names { if !gOpts.hidden && filename[0] == '.' {