From d0532eaf703396e838aa7dba77f58e296f503af5 Mon Sep 17 00:00:00 2001 From: Warren Dukes Date: Thu, 28 Oct 2004 04:51:46 +0000 Subject: new config file format stuff, quick test shows it works git-svn-id: https://svn.musicpd.org/mpd/branches/shank-rewrite-config@2373 09075e82-0dd4-0310-85a5-a0d7c8717e4f --- src/path.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/path.c') diff --git a/src/path.c b/src/path.c index 48d5eff09..1d599bda3 100644 --- a/src/path.c +++ b/src/path.c @@ -114,6 +114,7 @@ void initPaths(char * playlistDirArg, char * musicDirArg) { char * charset = NULL; char * originalLocale; struct stat st; + ConfigParam * param; playlistDir = prependCwdToPathDup(playlistDirArg); if((stat(playlistDir,&st))<0) { @@ -135,8 +136,10 @@ void initPaths(char * playlistDirArg, char * musicDirArg) { exit(EXIT_FAILURE); } - if(getConf()[CONF_FS_CHARSET]) { - charset = strdup(getConf()[CONF_FS_CHARSET]); + param = getConfigParam(CONF_FS_CHARSET); + + if(param) { + charset = strdup(param->value); } #ifdef HAVE_LOCALE #ifdef HAVE_LANGINFO_CODESET @@ -296,5 +299,3 @@ char * prependCwdToPathDup(char * path) { return realloc(ret,len+1); } - -/* vim:set shiftwidth=4 tabstop=8 expandtab: */ -- cgit v1.2.3