From 5f4509ad5dda2fb25711b686495497b8b275b3f4 Mon Sep 17 00:00:00 2001 From: Thomas Martitz Date: Mon, 26 Jul 2010 16:01:43 +0200 Subject: [PATCH] Convert PLAYLIST_CATALOG_DEFAULT_DIR. --- apps/playlist_catalog.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/apps/playlist_catalog.c b/apps/playlist_catalog.c index c61041696..2fbffdaa3 100644 --- a/apps/playlist_catalog.c +++ b/apps/playlist_catalog.c @@ -78,8 +78,13 @@ static int initialize_catalog(void) /* fall back to default directory if no or invalid config */ if (default_dir) - strlcpy(playlist_dir, PLAYLIST_CATALOG_DEFAULT_DIR, - sizeof(playlist_dir)); + { + const char *dir = get_user_file_path(PLAYLIST_CATALOG_DEFAULT_DIR, + FORCE_BUFFER_COPY|NEED_WRITE, + playlist_dir, sizeof(playlist_dir)); + if (!dir_exists(dir)) + mkdir(dir); + } playlist_dir_length = strlen(playlist_dir); -- 2.11.4.GIT