mirror of
https://github.com/ZoiteChat/zoitechat.git
synced 2026-03-14 09:40:20 +00:00
Use utf-8 variant of strftime to format log file paths.
strftime assumes the format string is in locale encoding, which mangles log file paths that are in utf-8. Fixes #767 Fixes #945
This commit is contained in:
@@ -540,7 +540,6 @@ log_create_pathname (char *servname, char *channame, char *netname)
|
||||
{
|
||||
char fname[384];
|
||||
char fnametime[384];
|
||||
struct tm *tm;
|
||||
time_t now;
|
||||
|
||||
if (!netname)
|
||||
@@ -568,8 +567,7 @@ log_create_pathname (char *servname, char *channame, char *netname)
|
||||
|
||||
/* insert time/date */
|
||||
now = time (NULL);
|
||||
tm = localtime (&now);
|
||||
strftime_validated (fnametime, sizeof (fnametime), fname, tm);
|
||||
strftime_utf8 (fnametime, sizeof (fnametime), fname, now);
|
||||
|
||||
/* create final path/filename */
|
||||
if (logmask_is_fullpath ())
|
||||
|
||||
Reference in New Issue
Block a user