From 8ba331adaea69d57c0eae4f9da1936485052f7ad Mon Sep 17 00:00:00 2001 From: Ron Pedde Date: Thu, 29 Jun 2006 07:01:06 +0000 Subject: [PATCH] Fix cover art on win32, closing #167 --- src/dynamic-art.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/dynamic-art.c b/src/dynamic-art.c index 387292b4..5f58d434 100644 --- a/src/dynamic-art.c +++ b/src/dynamic-art.c @@ -42,6 +42,7 @@ #include "err.h" #include "restart.h" #include "mp3-scanner.h" +#include "os.h" #include "scan-aac.h" #define BLKSIZE PIPE_BUF @@ -98,7 +99,10 @@ int da_get_image_fd(char *filename) { return -1; strncpy(buffer,filename,sizeof(buffer)); - path_end = strrchr(buffer,'/'); + path_end = strrchr(buffer,PATHSEP); + if(!path_end) + return -1; + strcpy(path_end+1,artfilename); free(artfilename); fd = open(buffer,O_RDONLY);