diff options
Diffstat (limited to 'src/core/core.c')
-rw-r--r-- | src/core/core.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/core/core.c b/src/core/core.c index f0a691f6..c4600993 100644 --- a/src/core/core.c +++ b/src/core/core.c @@ -129,6 +129,7 @@ void core_init_paths(int argc, char *argv[]) { "home", 0, POPT_ARG_STRING, NULL, 0, "Irssi home dir location (~/.irssi)", "PATH" }, { NULL, '\0', 0, NULL } }; + char *str; int n, len; for (n = 1; n < argc; n++) { @@ -147,6 +148,20 @@ void core_init_paths(int argc, char *argv[]) } } + if (irssi_dir != NULL && !g_path_is_absolute(irssi_dir)) { + str = irssi_dir; + irssi_dir = g_strdup_printf("%s/%s", g_get_current_dir(), str); + g_free(str); + } + + if (irssi_config_file != NULL && + !g_path_is_absolute(irssi_config_file)) { + str = irssi_config_file; + irssi_config_file = + g_strdup_printf("%s/%s", g_get_current_dir(), str); + g_free(str); + } + args_register(options); if (irssi_dir == NULL) |