We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 38745f6 commit 3581afeCopy full SHA for 3581afe
reader/extract/reader.go
@@ -383,16 +383,21 @@ func (t *ZIP) next() (err error) {
383
if t.f != nil {
384
t.f.Close()
385
}
386
- if t.idx >= 0 && t.idx < len(t.rd.File) {
+ for ;t.idx >= 0 && t.idx < len(t.rd.File); t.idx++ {
387
t.zipf = t.rd.File[t.idx]
388
+ if t.zipf.FileInfo().IsDir() {
389
+ continue
390
+ }
391
t.f, err = t.zipf.Open()
392
if err != nil {
393
return err
394
395
t.sLock.Lock()
396
t.source = t.zipf.Name
397
t.sLock.Unlock()
- } else {
398
+ break
399
400
+ if t.idx >= len(t.rd.File) || t.idx < 0 {
401
return io.EOF
402
403
t.idx++
0 commit comments