diff options
author | gramanas <anastasis.gramm2@gmail.com> | 2018-04-29 21:36:52 +0300 |
---|---|---|
committer | gramanas <anastasis.gramm2@gmail.com> | 2018-04-29 21:36:52 +0300 |
commit | 93eae1c206796d76e930c0c4860e4ead9c8fca14 (patch) | |
tree | 239940d27be834bcd16b28d6fcd03db4a00f3072 /src/actionparser.c | |
parent | 25ccc84ac00a7b3975dfdb0cc415522ca7793f0f (diff) | |
download | ck-93eae1c206796d76e930c0c4860e4ead9c8fca14.tar.gz ck-93eae1c206796d76e930c0c4860e4ead9c8fca14.tar.bz2 ck-93eae1c206796d76e930c0c4860e4ead9c8fca14.zip |
linkin park
Diffstat (limited to 'src/actionparser.c')
-rw-r--r-- | src/actionparser.c | 7 |
1 files changed, 3 insertions, 4 deletions
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; |