conf.c: correctly parse "~username/file" in config files

git-svn-id: https://svn.musicpd.org/mpd/trunk@3922 09075e82-0dd4-0310-85a5-a0d7c8717e4f
This commit is contained in:
Eric Wong 2006-03-16 05:51:46 +00:00
parent 89fc5da5d9
commit e0439446b7

View File

@ -416,7 +416,7 @@ ConfigParam * parseConfigFilePath(char * name, int force) {
for(;*ch!='\0' && *ch!='/';ch++);
if(*ch=='/') foundSlash = 1;
* ch = '\0';
pos+= ch-path+1;
pos+= ch-path-1;
if((pwd = getpwnam(path+1)) == NULL) {
ERROR("user \"%s\" not found at line %i\n",
path+1, param->line);