Handling a possible bug in the tag library

This commit is contained in:
Deluan 2016-03-04 22:29:29 -05:00
parent 0b6093ce5d
commit 7a21665c97
1 changed files with 7 additions and 0 deletions

View File

@ -152,6 +152,13 @@ func artistId(t *itl.Track) string {
}
func hasCoverArt(path string) bool {
beego.Trace("hasCOverArt:", path)
defer func() {
if r := recover(); r != nil {
beego.Error("Recovered from tag panic:", r)
}
}()
if _, err := os.Stat(path); err == nil {
f, err := os.Open(path)
if err != nil {