1
0
mirror of https://github.com/weechat/weechat.git synced 2026-06-25 04:16:38 +02:00

core: fix write of weechat.log to stdout with weechat-headless --stdout (issue #2247)

This commit is contained in:
Sébastien Helleu
2025-04-15 08:11:39 +02:00
parent 5c9d9bc8fc
commit 1478ecd77d
2 changed files with 13 additions and 11 deletions
+1
View File
@@ -4,6 +4,7 @@
### Fixed
- core: fix write of weechat.log to stdout with `weechat-headless --stdout` ([#2247](https://github.com/weechat/weechat/issues/2247))
- core: add refresh of window title on buffer switch, when option weechat.look.window_title is set
## Version 4.6.1 (2025-04-09)
+12 -11
View File
@@ -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)