|
|
@ -278,8 +278,8 @@ static char *get_config_path(void) {
|
|
|
|
for (i = 0; i < (int)(sizeof(config_paths) / sizeof(char *)); ++i) {
|
|
|
|
for (i = 0; i < (int)(sizeof(config_paths) / sizeof(char *)); ++i) {
|
|
|
|
if (wordexp(config_paths[i], &p, 0) == 0) {
|
|
|
|
if (wordexp(config_paths[i], &p, 0) == 0) {
|
|
|
|
path = strdup(p.we_wordv[0]);
|
|
|
|
path = strdup(p.we_wordv[0]);
|
|
|
|
|
|
|
|
wordfree(&p);
|
|
|
|
if (file_exists(path)) {
|
|
|
|
if (file_exists(path)) {
|
|
|
|
wordfree(&p);
|
|
|
|
|
|
|
|
return path;
|
|
|
|
return path;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|