mirror of
https://github.com/weechat/weechat.git
synced 2026-06-28 13:56:37 +02:00
core: fix write of weechat.log to stdout with weechat-headless --stdout (issue #2247)
This commit is contained in:
+12
-11
@@ -70,21 +70,22 @@ log_open (const char *filename, const char *mode)
|
||||
{
|
||||
weechat_log_file = stdout;
|
||||
}
|
||||
else if (filename)
|
||||
{
|
||||
weechat_log_filename = strdup (filename);
|
||||
}
|
||||
else
|
||||
{
|
||||
string_asprintf (&weechat_log_filename,
|
||||
"%s/%s", weechat_state_dir, WEECHAT_LOG_NAME);
|
||||
if (filename)
|
||||
{
|
||||
weechat_log_filename = strdup (filename);
|
||||
}
|
||||
else
|
||||
{
|
||||
string_asprintf (&weechat_log_filename,
|
||||
"%s/%s", weechat_state_dir, WEECHAT_LOG_NAME);
|
||||
}
|
||||
if (!weechat_log_filename)
|
||||
return 0;
|
||||
weechat_log_file = fopen (weechat_log_filename, mode);
|
||||
}
|
||||
|
||||
if (!weechat_log_filename)
|
||||
return 0;
|
||||
|
||||
weechat_log_file = fopen (weechat_log_filename, mode);
|
||||
|
||||
if (!weechat_log_file)
|
||||
{
|
||||
if (weechat_log_filename)
|
||||
|
||||
Reference in New Issue
Block a user