summaryrefslogtreecommitdiff
path: root/apps/playlist_catalog.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/playlist_catalog.c')
-rw-r--r--apps/playlist_catalog.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/apps/playlist_catalog.c b/apps/playlist_catalog.c
index bcca406494..69bcc54209 100644
--- a/apps/playlist_catalog.c
+++ b/apps/playlist_catalog.c
@@ -78,10 +78,7 @@ static size_t get_directory(char* dirbuf, size_t dirbuf_sz)
78 pl_dir = global_settings.playlist_catalog_dir; 78 pl_dir = global_settings.playlist_catalog_dir;
79 } 79 }
80 80
81 /* remove duplicate leading '/' */ 81 return path_append(dirbuf, pl_dir, PA_SEP_SOFT, dirbuf_sz);
82 path_strip_leading_separators(pl_dir, &pl_dir);
83
84 return strlcpy(dirbuf, pl_dir, dirbuf_sz);
85} 82}
86 83
87/* Retrieve playlist directory from config file and verify it exists 84/* Retrieve playlist directory from config file and verify it exists
@@ -127,8 +124,8 @@ void catalog_set_directory(const char* directory)
127 } 124 }
128 else 125 else
129 { 126 {
130 strmemccpy(global_settings.playlist_catalog_dir, 127 path_append(global_settings.playlist_catalog_dir, directory,
131 directory, sizeof(global_settings.playlist_catalog_dir)); 128 PA_SEP_SOFT, sizeof(global_settings.playlist_catalog_dir));
132 } 129 }
133 initialize_catalog(); 130 initialize_catalog();
134} 131}
@@ -204,8 +201,8 @@ restart:
204 { 201 {
205 if (strcmp(most_recent_playlist, selected_playlist)) /* isn't most recent one */ 202 if (strcmp(most_recent_playlist, selected_playlist)) /* isn't most recent one */
206 { 203 {
207 strmemccpy(most_recent_playlist, selected_playlist, 204 path_append(most_recent_playlist, selected_playlist,
208 sizeof(most_recent_playlist)); 205 PA_SEP_SOFT, sizeof(most_recent_playlist));
209 most_recent_selection = 0; 206 most_recent_selection = 0;
210 reopen_last_playlist = false; 207 reopen_last_playlist = false;
211 } 208 }