aboutsummaryrefslogtreecommitdiffstats
path: root/src/utils.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/utils.c')
-rw-r--r--src/utils.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/utils.c b/src/utils.c
index a2f112e72..ce9a09f72 100644
--- a/src/utils.c
+++ b/src/utils.c
@@ -65,12 +65,11 @@ char *parsePath(char *path)
const char *home;
if (path[1] == '/' || path[1] == '\0') {
- struct config_param *param = config_get_param(CONF_USER);
- if (param && param->value) {
- struct passwd *passwd = getpwnam(param->value);
+ const char *user = config_get_string(CONF_USER, NULL);
+ if (user != NULL) {
+ struct passwd *passwd = getpwnam(user);
if (!passwd) {
- g_warning("no such user %s",
- param->value);
+ g_warning("no such user %s", user);
return NULL;
}