Fix cover art on win32, closing #167

This commit is contained in:
Ron Pedde 2006-06-29 07:01:06 +00:00
parent b3b3f2f39c
commit 8ba331adae
1 changed files with 5 additions and 1 deletions

View File

@ -42,6 +42,7 @@
#include "err.h" #include "err.h"
#include "restart.h" #include "restart.h"
#include "mp3-scanner.h" #include "mp3-scanner.h"
#include "os.h"
#include "scan-aac.h" #include "scan-aac.h"
#define BLKSIZE PIPE_BUF #define BLKSIZE PIPE_BUF
@ -98,7 +99,10 @@ int da_get_image_fd(char *filename) {
return -1; return -1;
strncpy(buffer,filename,sizeof(buffer)); strncpy(buffer,filename,sizeof(buffer));
path_end = strrchr(buffer,'/'); path_end = strrchr(buffer,PATHSEP);
if(!path_end)
return -1;
strcpy(path_end+1,artfilename); strcpy(path_end+1,artfilename);
free(artfilename); free(artfilename);
fd = open(buffer,O_RDONLY); fd = open(buffer,O_RDONLY);