Revision: 9987 https://osdn.net/projects/ttssh2/scm/svn/commits/9987 Author: zmatsuo Date: 2022-06-04 22:17:02 +0900 (Sat, 04 Jun 2022) Log Message: ----------- セッションの複製時にログが自動で開始されない - 複製時に引き継ぐ内容に、ログファイル名が含まれていた - 引き継ぎ前の Tera Term と同一のログファイルは作成できない - ログファイル名は引き継がないようにした ticket #44707 Ticket Links: ------------ https://osdn.net/projects/ttssh2/tracker/detail/44707 Modified Paths: -------------- trunk/teraterm/teraterm/vtwin.cpp trunk/teraterm/ttpcmn/ttcmn_dup.cpp -------------- next part -------------- Modified: trunk/teraterm/teraterm/vtwin.cpp =================================================================== --- trunk/teraterm/teraterm/vtwin.cpp 2022-06-02 15:40:39 UTC (rev 9986) +++ trunk/teraterm/teraterm/vtwin.cpp 2022-06-04 13:17:02 UTC (rev 9987) @@ -3338,19 +3338,21 @@ } /* Auto start logging or /L= option */ - if (ts.LogAutoStart || ts.LogFN[0] != 0) { - if (ts.LogFN[0] == 0) { - ts.LogFNW = FLogGetLogFilename(NULL); - } - else { - wchar_t *LogFNW = ToWcharA(ts.LogFN); + if (ts.LogAutoStart || ts.LogFNW != NULL) { + if (ts.LogFNW != NULL) { + // "/L"= \x82Ŏw\x92肳\x82\xEA\x82Ă\xA2\x82\xE9\x82Ƃ\xAB(Auto start logging \x82\xA9\x82\xE0\x82\xB5\x82\xEA\x82Ȃ\xA2) + // \x8Ew\x92\xE8\x83t\x83@\x83C\x83\x8B\x96\xBC\x82\xF0\x93W\x8AJ\x82\xB7\x82\xE9 + wchar_t *LogFNW = _wcsdup(ts.LogFNW); ts.LogFNW = FLogGetLogFilename(LogFNW); free(LogFNW); } + else { + // Auto start logging \x82̂Ƃ\xAB("/L"\x82Ŏw\x92肳\x82\xEA\x82Ă\xA2\x82Ȃ\xA2\x82Ƃ\xAB) + // \x83f\x83t\x83H\x83\x8B\x83g\x82̃t\x83@\x83C\x83\x8B\x96\xBC + ts.LogFNW = FLogGetLogFilename(NULL); + } WideCharToACP_t(ts.LogFNW, ts.LogFN, sizeof(ts.LogFN)); - if (ts.LogFN[0]!=0) { - FLogOpen(ts.LogFNW, LOG_UTF8, FALSE); - } + FLogOpen(ts.LogFNW, LOG_UTF8, FALSE); } if ((ts.PortType==IdTCPIP) && Modified: trunk/teraterm/ttpcmn/ttcmn_dup.cpp =================================================================== --- trunk/teraterm/ttpcmn/ttcmn_dup.cpp 2022-06-02 15:40:39 UTC (rev 9986) +++ trunk/teraterm/ttpcmn/ttcmn_dup.cpp 2022-06-04 13:17:02 UTC (rev 9987) @@ -244,7 +244,6 @@ { MALLOCED_WSTRING_INFO(TTTSet, HomeDirW) }, { MALLOCED_WSTRING_INFO(TTTSet, SetupFNameW) }, { MALLOCED_WSTRING_INFO(TTTSet, KeyCnfFNW) }, - { MALLOCED_WSTRING_INFO(TTTSet, LogFNW) }, { MALLOCED_WSTRING_INFO(TTTSet, MacroFNW) }, { MALLOCED_WSTRING_INFO(TTTSet, UILanguageFileW) }, { MALLOCED_WSTRING_INFO(TTTSet, UILanguageFileW_ini) }, @@ -295,4 +294,9 @@ size -= signature_size; UnserializeData(data, size, serialize_info, ts); } + + // \x83\x8D\x83O\x83t\x83@\x83C\x83\x8B\x96\xBC\x82͕\xA1\x90\xBB\x8C\xB3\x82Ɠ\xAF\x88\xEA\x82ɂ͂ł\xAB\x82Ȃ\xA2\x82̂ň\xF8\x82\xAB\x8Cp\x82\xA2\x82ł\xA2\x82Ȃ\xA2 + // \x83|\x83C\x83\x93\x83^\x82ƃp\x83X(ANSI)\x82\xF0\x83N\x83\x8A\x83A\x82\xB7\x82\xE9 + ts->LogFNW = NULL; + ts->LogFN[0] = 0; }