summaryrefslogtreecommitdiff
path: root/apps/tree.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/tree.c')
-rw-r--r--apps/tree.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/apps/tree.c b/apps/tree.c
index c2ec4ca3ec..f8874f684e 100644
--- a/apps/tree.c
+++ b/apps/tree.c
@@ -1075,6 +1075,7 @@ bool bookmark_play(char *resume_file, int index, int offset, int seed,
1075 lastdir[0]='\0'; 1075 lastdir[0]='\0';
1076 if (playlist_create(resume_file, NULL) != -1) 1076 if (playlist_create(resume_file, NULL) != -1)
1077 { 1077 {
1078 char filename_buf[MAX_PATH + 1];
1078 const char* peek_filename; 1079 const char* peek_filename;
1079 resume_directory(resume_file); 1080 resume_directory(resume_file);
1080 if (global_settings.playlist_shuffle) 1081 if (global_settings.playlist_shuffle)
@@ -1082,13 +1083,15 @@ bool bookmark_play(char *resume_file, int index, int offset, int seed,
1082 1083
1083 /* Check if the file is at the same spot in the directory, 1084 /* Check if the file is at the same spot in the directory,
1084 else search for it */ 1085 else search for it */
1085 peek_filename = playlist_peek(index); 1086 peek_filename = playlist_peek(index, filename_buf,
1087 sizeof(filename_buf));
1086 1088
1087 if (peek_filename == NULL) 1089 if (peek_filename == NULL)
1088 { 1090 {
1089 /* playlist has shrunk, search from the top */ 1091 /* playlist has shrunk, search from the top */
1090 index = 0; 1092 index = 0;
1091 peek_filename = playlist_peek(index); 1093 peek_filename = playlist_peek(index, filename_buf,
1094 sizeof(filename_buf));
1092 if (peek_filename == NULL) 1095 if (peek_filename == NULL)
1093 return false; 1096 return false;
1094 } 1097 }
@@ -1097,7 +1100,8 @@ bool bookmark_play(char *resume_file, int index, int offset, int seed,
1097 { 1100 {
1098 for ( i=0; i < playlist_amount(); i++ ) 1101 for ( i=0; i < playlist_amount(); i++ )
1099 { 1102 {
1100 peek_filename = playlist_peek(i); 1103 peek_filename = playlist_peek(i, filename_buf,
1104 sizeof(filename_buf));
1101 1105
1102 if (peek_filename == NULL) 1106 if (peek_filename == NULL)
1103 return false; 1107 return false;