From 93eae1c206796d76e930c0c4860e4ead9c8fca14 Mon Sep 17 00:00:00 2001 From: gramanas Date: Sun, 29 Apr 2018 21:36:52 +0300 Subject: linkin park --- src/actionparser.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src/actionparser.c') diff --git a/src/actionparser.c b/src/actionparser.c index 207a089..0dca98c 100644 --- a/src/actionparser.c +++ b/src/actionparser.c @@ -203,11 +203,10 @@ void get_config(UserOpt *opt) { return; } } - char * defaultConf = "/.ck"; + char * defaultConf = ".ck"; char * home = getenv("HOME"); - opt->confDir = malloc(strlen(defaultConf)+strlen(home)+1); - strcpy(opt->confDir, home); - strcat(opt->confDir, defaultConf); + opt->confDir = malloc(strlen(defaultConf) + 1 /* '/' */ + strlen(home)+1); + str_join_dirname_with_basename(opt->confDir, home, defaultConf); // rewind pos = pos - 1; -- cgit v1.2.3