cleanup
This commit is contained in:
parent
97e7a6239f
commit
e6a1621261
16
nav.go
16
nav.go
@ -106,15 +106,15 @@ func readdir(path string) ([]*file, error) {
|
||||
d, err := os.Open(fpath)
|
||||
if err != nil {
|
||||
dirCount = -2
|
||||
}
|
||||
|
||||
names, err := d.Readdirnames(1000)
|
||||
d.Close()
|
||||
|
||||
if names == nil && err != io.EOF {
|
||||
dirCount = -2
|
||||
} else {
|
||||
dirCount = len(names)
|
||||
names, err := d.Readdirnames(1000)
|
||||
d.Close()
|
||||
|
||||
if names == nil && err != io.EOF {
|
||||
dirCount = -2
|
||||
} else {
|
||||
dirCount = len(names)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user