From 068d307a711bbcefc6868ff97fdf931269d13b44 Mon Sep 17 00:00:00 2001 From: Warren Dukes Date: Tue, 24 Feb 2004 21:20:16 +0000 Subject: make ~ work for paths git-svn-id: https://svn.musicpd.org/mpd/trunk@37 09075e82-0dd4-0310-85a5-a0d7c8717e4f --- src/conf.c | 48 +++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 47 insertions(+), 1 deletion(-) (limited to 'src/conf.c') diff --git a/src/conf.c b/src/conf.c index 656771cb0..889a0086b 100644 --- a/src/conf.c +++ b/src/conf.c @@ -29,6 +29,9 @@ #include #include #include +#include +#include +#include #define MAX_STRING_SIZE MAXPATHLEN+80 @@ -206,11 +209,54 @@ char ** readConf(char * file) { for(i=0;ipw_dir)+strlen( + &(conf_params[conf_absolutePaths[i]][pos]))); + strcpy(path,pwd->pw_dir); + strcat(path,&(conf_params[conf_absolutePaths[i]][pos])); + free(conf_params[conf_absolutePaths[i]]); + conf_params[conf_absolutePaths[i]] = path; + } } return conf_params; -- cgit v1.2.3