Skip to content

Commit

Permalink
don't freak out if there's a file without and extension
Browse files Browse the repository at this point in the history
  • Loading branch information
sentriz committed Jul 31, 2019
1 parent afb68bc commit 03af38b
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions scanner/scanner.go
Original file line number Diff line number Diff line change
Expand Up @@ -201,8 +201,11 @@ func (s *Scanner) callbackItem(fullPath string, info *godirwalk.Dirent) error {
s.curCover = filename
return nil
}
ext := path.Ext(filename)[1:]
if _, ok := mime.Types[ext]; ok {
ext := path.Ext(filename)
if ext == "" {
return nil
}
if _, ok := mime.Types[ext[1:]]; ok {
return s.handleTrack(it)
}
return nil
Expand Down

0 comments on commit 03af38b

Please sign in to comment.