• R/O
  • SSH
  • HTTPS

ttssh2: Commit


Commit MetaInfo

Révision9468 (tree)
l'heure2021-10-14 23:51:56
Auteurzmatsuo

Message de Log

telnet のログをログフォルダに作成するようにした

Change Summary

Modification

--- trunk/teraterm/teraterm/telnet.c (revision 9467)
+++ trunk/teraterm/teraterm/telnet.c (revision 9468)
@@ -40,6 +40,7 @@
4040 #include <process.h>
4141
4242 #include "telnet.h"
43+#include "asprintf.h"
4344 #include "tt_res.h"
4445
4546 int TelStatus;
@@ -123,10 +124,13 @@
123124 tr.WinSize.x = ts.TerminalWidth;
124125 tr.WinSize.y = ts.TerminalHeight;
125126
126- if ((ts.LogFlag & LOG_TEL) != 0)
127- tr.LogFile = CreateFileA("TELNET.LOG", GENERIC_WRITE, FILE_SHARE_READ | FILE_SHARE_WRITE, NULL,
127+ if ((ts.LogFlag & LOG_TEL) != 0) {
128+ wchar_t *full_path = NULL;
129+ awcscats(&full_path, ts.LogDirW, L"\\", L"TELNET.LOG", NULL);
130+ tr.LogFile = CreateFileW(full_path, GENERIC_WRITE, FILE_SHARE_READ | FILE_SHARE_WRITE, NULL,
128131 CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);
129- else
132+ free(full_path);
133+ } else
130134 tr.LogFile = 0;
131135 }
132136
Afficher sur ancien navigateur de dépôt.