Revision: 9469 https://osdn.net/projects/ttssh2/scm/svn/commits/9469 Author: zmatsuo Date: 2021-10-14 23:52:05 +0900 (Thu, 14 Oct 2021) Log Message: ----------- ttxssh のログファイルをログフォルダに作成するようにした Modified Paths: -------------- trunk/ttssh2/ttxssh/ttxssh.c -------------- next part -------------- Modified: trunk/ttssh2/ttxssh/ttxssh.c =================================================================== --- trunk/ttssh2/ttxssh/ttxssh.c 2021-10-14 14:51:56 UTC (rev 9468) +++ trunk/ttssh2/ttxssh/ttxssh.c 2021-10-14 14:52:05 UTC (rev 9469) @@ -798,12 +798,12 @@ void logputs(int level, char *msg) { if (level <= pvar->settings.LogLevel) { - char buf[4096]; int file; - get_teraterm_dir_relative_name(buf, NUM_ELEM(buf), "TTSSH.LOG"); - file = _open(buf, _O_RDWR | _O_APPEND | _O_CREAT | _O_TEXT, - _S_IREAD | _S_IWRITE); + wchar_t *fname = get_teraterm_dir_relative_nameW(L"TTSSH.LOG"); + file = _wopen(fname, _O_RDWR | _O_APPEND | _O_CREAT | _O_TEXT, + _S_IREAD | _S_IWRITE); + free(fname); if (file >= 0) { char *strtime = mctimelocal("%Y-%m-%d %H:%M:%S.%NZ", TRUE);