diff options
Diffstat (limited to 'apps')
-rw-r--r-- | apps/playlist.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/apps/playlist.c b/apps/playlist.c index 2e21aef717..942a5785b1 100644 --- a/apps/playlist.c +++ b/apps/playlist.c | |||
@@ -39,6 +39,7 @@ char* playlist_next(int type) | |||
39 | int seek = playlist.indices[playlist.index]; | 39 | int seek = playlist.indices[playlist.index]; |
40 | int max; | 40 | int max; |
41 | int fd; | 41 | int fd; |
42 | int i; | ||
42 | (void)type; /* prevent compiler warning until this is gets used */ | 43 | (void)type; /* prevent compiler warning until this is gets used */ |
43 | 44 | ||
44 | playlist.index = (playlist.index+1) % playlist.amount; | 45 | playlist.index = (playlist.index+1) % playlist.amount; |
@@ -57,12 +58,22 @@ char* playlist_next(int type) | |||
57 | seek++; | 58 | seek++; |
58 | 59 | ||
59 | now_playing[seek]=0; | 60 | now_playing[seek]=0; |
61 | |||
62 | /* replace backslashes with forward slashes */ | ||
63 | for ( i=1; i<seek; i++ ) | ||
64 | if ( now_playing[i] == '\\' ) | ||
65 | now_playing[i] = '/'; | ||
60 | 66 | ||
61 | if('/' == now_playing[1]) | 67 | if('/' == now_playing[1]) |
62 | return &now_playing[1]; | 68 | return &now_playing[1]; |
63 | else { | 69 | else { |
64 | now_playing[0]='/'; | 70 | /* handle dos style drive letter */ |
65 | return now_playing; | 71 | if ( ':' == now_playing[2] ) |
72 | return &now_playing[3]; | ||
73 | else { | ||
74 | now_playing[0]='/'; | ||
75 | return now_playing; | ||
76 | } | ||
66 | } | 77 | } |
67 | } | 78 | } |
68 | else | 79 | else |