mirror of
https://github.com/owntone/owntone-server.git
synced 2024-12-25 06:35:57 -05:00
Handle short file errors better
This commit is contained in:
parent
b50617d356
commit
b033952af2
@ -1527,7 +1527,7 @@ int scan_get_mp3fileinfo(char *file, MP3FILE *pmp3) {
|
||||
if(fread(buffer,1,sizeof(buffer),infile) < sizeof(buffer)) {
|
||||
DPRINTF(E_LOG,L_SCAN,"Short read: %s\n",file);
|
||||
fclose(infile);
|
||||
break;
|
||||
return 0;
|
||||
}
|
||||
|
||||
index=0;
|
||||
@ -1565,7 +1565,12 @@ int scan_get_mp3fileinfo(char *file, MP3FILE *pmp3) {
|
||||
found=1;
|
||||
fp_size += index;
|
||||
}
|
||||
} else {
|
||||
DPRINTF(E_LOG,L_SCAN,"Could not read frame header: %s\n",file);
|
||||
fclose(infile);
|
||||
return 0;
|
||||
}
|
||||
|
||||
if(!found) {
|
||||
DPRINTF(E_DBG,L_SCAN,"Didn't pan out.\n");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user