summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/core/wee-debug.c3
-rw-r--r--src/core/weechat.c12
2 files changed, 4 insertions, 11 deletions
diff --git a/src/core/wee-debug.c b/src/core/wee-debug.c
index 9a031167e..cae470ba8 100644
--- a/src/core/wee-debug.c
+++ b/src/core/wee-debug.c
@@ -591,6 +591,7 @@ void
debug_directories ()
{
char *extra_libdir;
+ const char *ptr_home = WEECHAT_HOME;
extra_libdir = getenv (WEECHAT_EXTRA_LIBDIR);
@@ -601,7 +602,7 @@ debug_directories ()
(weechat_home_temp) ? " " : "",
(weechat_home_temp) ? _("(TEMPORARY, deleted on exit)") : "");
gui_chat_printf (NULL, _(" (default: %s)"),
- WEECHAT_HOME);
+ (ptr_home && ptr_home[0]) ? ptr_home : "~/.weechat");
gui_chat_printf (NULL, " lib: %s", WEECHAT_LIBDIR);
gui_chat_printf (NULL, " lib (extra): %s",
(extra_libdir && extra_libdir[0]) ? extra_libdir : "-");
diff --git a/src/core/weechat.c b/src/core/weechat.c
index 6d97bfe35..32456bdde 100644
--- a/src/core/weechat.c
+++ b/src/core/weechat.c
@@ -496,16 +496,8 @@ weechat_create_home_dir ()
if (!weechat_home)
{
config_weechat_home = WEECHAT_HOME;
- if (!config_weechat_home[0])
- {
- string_fprintf (stderr,
- _("Error: WEECHAT_HOME is undefined, check build "
- "options\n"));
- weechat_shutdown (EXIT_FAILURE, 0);
- /* make C static analyzer happy (never executed) */
- return;
- }
- weechat_set_home_path (config_weechat_home);
+ weechat_set_home_path (
+ (config_weechat_home[0] ? config_weechat_home : "~/.weechat"));
}
/* if home already exists, it has to be a directory */