summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--apps/playlist.c23
1 files changed, 4 insertions, 19 deletions
diff --git a/apps/playlist.c b/apps/playlist.c
index e19690f8ab..373d2d534a 100644
--- a/apps/playlist.c
+++ b/apps/playlist.c
@@ -2516,7 +2516,6 @@ char* playlist_peek(int steps)
2516{ 2516{
2517 struct playlist_info* playlist = &current_playlist; 2517 struct playlist_info* playlist = &current_playlist;
2518 int seek; 2518 int seek;
2519 int fd;
2520 char *temp_ptr; 2519 char *temp_ptr;
2521 int index; 2520 int index;
2522 bool control_file; 2521 bool control_file;
@@ -2540,26 +2539,12 @@ char* playlist_peek(int steps)
2540 (workaround for buggy playlist creation tools) */ 2539 (workaround for buggy playlist creation tools) */
2541 while (temp_ptr) 2540 while (temp_ptr)
2542 { 2541 {
2543#ifdef HAVE_DIRCACHE 2542 if (file_exists(temp_ptr))
2544 if (dircache_is_enabled()) 2543 break;
2545 { 2544
2546 if (dircache_get_entry_ptr(temp_ptr))
2547 break;
2548 }
2549 else
2550#endif
2551 {
2552 fd = open(temp_ptr, O_RDONLY);
2553 if (fd >= 0)
2554 {
2555 close(fd);
2556 break;
2557 }
2558 }
2559
2560 temp_ptr = strchr(temp_ptr+1, '/'); 2545 temp_ptr = strchr(temp_ptr+1, '/');
2561 } 2546 }
2562 2547
2563 if (!temp_ptr) 2548 if (!temp_ptr)
2564 { 2549 {
2565 /* Even though this is an invalid file, we still need to pass a 2550 /* Even though this is an invalid file, we still need to pass a