From dd146c48e606c34fb338641a2b9bb4194e378f7e Mon Sep 17 00:00:00 2001 From: Antoine Cellerier Date: Sun, 24 Sep 2006 16:21:52 +0000 Subject: [PATCH] Use DIR_SEP --- modules/meta_engine/dummy.c | 3 ++- src/input/input.c | 13 ++++++++----- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/modules/meta_engine/dummy.c b/modules/meta_engine/dummy.c index 6cd97b057d5b..cb5fd84fd015 100644 --- a/modules/meta_engine/dummy.c +++ b/modules/meta_engine/dummy.c @@ -94,7 +94,8 @@ static int FindMeta( vlc_object_t *p_this ) char *psz_filename; struct stat a; asprintf( &psz_filename, - "file://%s/" CONFIG_DIR "/art/%s/%s/art.jpg", /* ahem ... we can have other filetype too... */ + "file://%s" DIR_SEP CONFIG_DIR DIR_SEP "art" + DIR_SEP "%s" DIR_SEP "%s" DIR_SEP "art.jpg", /* ahem ... we can have other filetype too... */ p_me->p_libvlc->psz_homedir, p_item->p_meta->psz_artist, p_item->p_meta->psz_album ); diff --git a/src/input/input.c b/src/input/input.c index 29c270e74304..cacd0c642593 100644 --- a/src/input/input.c +++ b/src/input/input.c @@ -2560,7 +2560,8 @@ int input_DownloadAndCacheArt( vlc_object_t *p_parent, input_item_t *p_item ) snprintf( psz_filename, MAX_PATH, - "file://%s/" CONFIG_DIR "/art/%s/%s/art%s", + "file://%s" DIR_SEP CONFIG_DIR DIR_SEP "art" + DIR_SEP "%s" DIR_SEP "%s" DIR_SEP "art%s", p_parent->p_libvlc->psz_homedir, psz_artist, psz_album, psz_type ); msg_Dbg( p_parent, "Saving album art to %s", psz_filename ); @@ -2577,16 +2578,18 @@ int input_DownloadAndCacheArt( vlc_object_t *p_parent, input_item_t *p_item ) { /* GRUIKKKKKKKKKK (make sure that all the directories exist) */ char *psz_dir = malloc( MAX_PATH ); - snprintf( psz_dir, MAX_PATH, "%s/" CONFIG_DIR, + snprintf( psz_dir, MAX_PATH, "%s" DIR_SEP CONFIG_DIR, p_parent->p_libvlc->psz_homedir ); utf8_mkdir( psz_dir ); - snprintf( psz_dir, MAX_PATH, "%s/" CONFIG_DIR "/art", + snprintf( psz_dir, MAX_PATH, "%s" DIR_SEP CONFIG_DIR DIR_SEP "art", p_parent->p_libvlc->psz_homedir ); utf8_mkdir( psz_dir ); - snprintf( psz_dir, MAX_PATH, "%s/" CONFIG_DIR "/art/%s", + snprintf( psz_dir, MAX_PATH, "%s" DIR_SEP CONFIG_DIR DIR_SEP + "art" DIR_SEP "%s", p_parent->p_libvlc->psz_homedir, psz_artist ); utf8_mkdir( psz_dir ); - snprintf( psz_dir, MAX_PATH, "%s/" CONFIG_DIR "/art/%s/%s", + snprintf( psz_dir, MAX_PATH, "%s" DIR_SEP CONFIG_DIR DIR_SEP + "art" DIR_SEP "%s" DIR_SEP "%s", p_parent->p_libvlc->psz_homedir, psz_artist, psz_album ); utf8_mkdir( psz_dir );