aboutsummaryrefslogtreecommitdiffstats
path: root/src/playlist.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/playlist.c')
-rw-r--r--src/playlist.c18
1 files changed, 14 insertions, 4 deletions
diff --git a/src/playlist.c b/src/playlist.c
index 3a2bfcc78..580116260 100644
--- a/src/playlist.c
+++ b/src/playlist.c
@@ -1408,11 +1408,21 @@ int loadPlaylist(FILE * fp, char * utf8file) {
if(commentCharFound && !getSongFromDB(temp)
&& !isRemoteUrl(temp))
{
- free(temp);
- continue;
}
- if((addToPlaylist(stderr, temp, 0))<0) {
- if(!erroredFile) erroredFile = strdup(temp);
+ else if((addToPlaylist(stderr, temp, 0))<0) {
+ /* for windows compatibilit, convert slashes */
+ char * temp2 = strdup(temp);
+ char * p = temp2;
+ while(*p) {
+ if(*p=='\\') *p = '/';
+ p++;
+ }
+ if((addToPlaylist(stderr, temp2, 0))<0) {
+ if(!erroredFile) {
+ erroredFile = strdup(temp);
+ }
+ }
+ free(temp2);
}
free(temp);
}