summaryrefslogtreecommitdiff
path: root/apps/playlist.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/playlist.c')
-rw-r--r--apps/playlist.c19
1 files changed, 11 insertions, 8 deletions
diff --git a/apps/playlist.c b/apps/playlist.c
index 058dcfe88c..165c13847b 100644
--- a/apps/playlist.c
+++ b/apps/playlist.c
@@ -490,18 +490,21 @@ char* playlist_peek(int steps)
490 490
491 /* remove bogus dirs from beginning of path 491 /* remove bogus dirs from beginning of path
492 (workaround for buggy playlist creation tools) */ 492 (workaround for buggy playlist creation tools) */
493 while (buf) 493 if(!playlist.in_ram)
494 { 494 {
495 fd = open(buf, O_RDONLY); 495 while (buf)
496 if (fd > 0)
497 { 496 {
498 close(fd); 497 fd = open(buf, O_RDONLY);
499 break; 498 if (fd >= 0)
499 {
500 close(fd);
501 break;
502 }
503
504 buf = strchr(buf+1, '/');
500 } 505 }
501
502 buf = strchr(buf+1, '/');
503 } 506 }
504 507
505 if (!buf) 508 if (!buf)
506 { 509 {
507 /* Even though this is an invalid file, we still need to pass a file 510 /* Even though this is an invalid file, we still need to pass a file