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:
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user