diff options
Diffstat (limited to 'apps')
-rw-r--r-- | apps/playlist_catalog.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/apps/playlist_catalog.c b/apps/playlist_catalog.c index 1bd4b7ee13..bcca406494 100644 --- a/apps/playlist_catalog.c +++ b/apps/playlist_catalog.c | |||
@@ -70,7 +70,7 @@ static int browser_status = CATBROWSE_NOTHING; | |||
70 | 70 | ||
71 | static size_t get_directory(char* dirbuf, size_t dirbuf_sz) | 71 | static size_t get_directory(char* dirbuf, size_t dirbuf_sz) |
72 | { | 72 | { |
73 | char *pl_dir = PLAYLIST_CATALOG_DEFAULT_DIR; | 73 | const char *pl_dir = PLAYLIST_CATALOG_DEFAULT_DIR; |
74 | 74 | ||
75 | /* directory config is of the format: "dir: /path/to/dir" */ | 75 | /* directory config is of the format: "dir: /path/to/dir" */ |
76 | if (global_settings.playlist_catalog_dir[0] != '\0') | 76 | if (global_settings.playlist_catalog_dir[0] != '\0') |
@@ -79,10 +79,7 @@ static size_t get_directory(char* dirbuf, size_t dirbuf_sz) | |||
79 | } | 79 | } |
80 | 80 | ||
81 | /* remove duplicate leading '/' */ | 81 | /* remove duplicate leading '/' */ |
82 | if (pl_dir[0] == '/' && pl_dir[1] == '/') | 82 | path_strip_leading_separators(pl_dir, &pl_dir); |
83 | { | ||
84 | pl_dir++; | ||
85 | } | ||
86 | 83 | ||
87 | return strlcpy(dirbuf, pl_dir, dirbuf_sz); | 84 | return strlcpy(dirbuf, pl_dir, dirbuf_sz); |
88 | } | 85 | } |