1
0
mirror of https://github.com/weechat/weechat.git synced 2026-06-12 14:14:48 +02:00

logger: fix path displayed when the logs directory can not be created

This commit is contained in:
Sébastien Helleu
2024-12-21 17:15:38 +01:00
parent 52cb5bbbe0
commit 46f322c10f
3 changed files with 9 additions and 8 deletions
+1
View File
@@ -4,6 +4,7 @@
### Fixed
- logger: fix path displayed when the logs directory can not be created
- perl: fix build with Perl < 5.7.29 ([#2219](https://github.com/weechat/weechat/issues/2219), [#2220](https://github.com/weechat/weechat/issues/2220))
## Version 4.5.0 (2024-12-15)
-8
View File
@@ -265,15 +265,7 @@ logger_buffer_create_log_file (struct t_logger_buffer *logger_buffer)
/* create directory */
if (!logger_create_directory ())
{
weechat_printf_date_tags (
NULL, 0, "no_log",
_("%s%s: unable to create directory for logs "
"(\"%s\")"),
weechat_prefix ("error"), LOGGER_PLUGIN_NAME,
weechat_config_string (logger_config_file_path));
return 0;
}
if (!logger_buffer->log_filename)
logger_buffer_set_log_filename (logger_buffer);
if (!logger_buffer->log_filename)
+8
View File
@@ -182,7 +182,15 @@ logger_create_directory ()
if (file_path)
{
if (!weechat_mkdir_parents (file_path, 0700))
{
weechat_printf_date_tags (
NULL, 0, "no_log",
_("%s%s: unable to create directory for logs "
"(\"%s\")"),
weechat_prefix ("error"), LOGGER_PLUGIN_NAME,
file_path);
rc = 0;
}
free (file_path);
}
else