Skip to content

Commit

Permalink
Do not return empty named files or directories
Browse files Browse the repository at this point in the history
  • Loading branch information
c4milo committed Nov 15, 2015
1 parent 8c0ea07 commit 8ccc8cd
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion reader.go
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,11 @@ func (r *Reader) Next() (os.FileInfo, error) {
r.queue.Dequeue()
}

if drecord.IsDir() && drecord.fileID != "" {
if drecord.fileID == "" {
return r.Next()
}

if drecord.IsDir() {
r.queue.Enqueue(drecord)
} else {
drecord.image = r.image
Expand Down

0 comments on commit 8ccc8cd

Please sign in to comment.