diff --git a/src/common.c b/src/common.c index 7873e812..fd8da3e4 100644 --- a/src/common.c +++ b/src/common.c @@ -36,15 +36,6 @@ p_slist_free_full(GSList *items, GDestroyNotify free_func) g_slist_free (items); } -void -create_config_directory() -{ - GString *dir = g_string_new(getenv("HOME")); - g_string_append(dir, "/.profanity"); - create_dir(dir->str); - g_string_free(dir, TRUE); -} - void create_dir(char *name) { diff --git a/src/common.h b/src/common.h index 351aa230..22daa038 100644 --- a/src/common.h +++ b/src/common.h @@ -36,7 +36,6 @@ #define ARRAY_SIZE(x) (sizeof(x)/sizeof(x[0])) void p_slist_free_full(GSList *items, GDestroyNotify free_func); -void create_config_directory(void); void create_dir(char *name); void get_time(char *thetime); char * str_replace(const char *string, const char *substr, diff --git a/src/profanity.c b/src/profanity.c index a1665271..48f20e6c 100644 --- a/src/profanity.c +++ b/src/profanity.c @@ -37,6 +37,7 @@ static log_level_t _get_log_level(char *log_level); gboolean _process_input(char *inp); static void _profanity_shutdown(void); +static void _create_config_directory(); void profanity_run(void) @@ -73,7 +74,7 @@ profanity_run(void) void profanity_init(const int disable_tls, char *log_level) { - create_config_directory(); + _create_config_directory(); log_level_t prof_log_level = _get_log_level(log_level); log_init(prof_log_level); log_info("Starting Profanity (%s)...", PACKAGE_VERSION); @@ -151,3 +152,13 @@ _process_input(char *inp) return result; } + +static void +_create_config_directory() +{ + GString *dir = g_string_new(getenv("HOME")); + g_string_append(dir, "/.profanity"); + create_dir(dir->str); + g_string_free(dir, TRUE); +} +