Revision: 9806 https://osdn.net/projects/ttssh2/scm/svn/commits/9806 Author: zmatsuo Date: 2022-03-13 01:57:17 +0900 (Sun, 13 Mar 2022) Log Message: ----------- filecreateマクロで作成したファイルが読み込みできない - 次のとき読み込みできない - filecreate ファイルを作成 - filewrite でファイルへ書き込み - fileseekback, fileseek などで書き込み(読み込み)位置を書き込まれている位置へ移動する - filereadln などでファイル読み込み -> 読み込めない - filecreate マクロ内の CreateFile() のオプションを修正 - dwDesiredAccess, dwShareMode - 修正前 - CreateFileA(GENERIC_WRITE, FILE_SHARE_WRITE) 相当 - 修正後 - CreateFileA(GENERIC_WRITE|GENERIC_READ, FILE_SHARE_READ | FILE_SHARE_WRITE) - trunkは修正後と同様のため修正不要 Modified Paths: -------------- branches/4-stable/doc/en/html/about/history.html branches/4-stable/doc/ja/html/about/history.html branches/4-stable/teraterm/ttpmacro/ttl.c -------------- next part -------------- Modified: branches/4-stable/doc/en/html/about/history.html =================================================================== --- branches/4-stable/doc/en/html/about/history.html 2022-03-12 05:39:20 UTC (rev 9805) +++ branches/4-stable/doc/en/html/about/history.html 2022-03-12 16:57:17 UTC (rev 9806) @@ -43,6 +43,7 @@ <ul> <li>The file handle of TELNET.LOG could not be closed.</li> <!--li>telnet(cygterm)\x90ڑ\xB1\x8E\x9E\x81ANAWS(Negotiate About Window Size)\x82\xAA\x91\x97\x82\xE7\x82\xEA\x82Ă\xAB\x82\xBD\x82Ƃ\xAB\x83E\x83B\x83\x93\x83h\x83E\x83T\x83C\x83Y\x82\xF0\x8C\xEB\x82\xC1\x82Đݒ肷\x82\xE9\x89\\x90\xAB\x82\xAA\x82\xA0\x82\xC1\x82\xBD\x82̂ŏC\x90\xB3\x81B</li--> + <li>MACRO: the file created with <a href="../macro/command/filecreate.html">filecreate</a> command can not be read without fileclose. This bug was introduced in 4.102.</li> </ul> </li> Modified: branches/4-stable/doc/ja/html/about/history.html =================================================================== --- branches/4-stable/doc/ja/html/about/history.html 2022-03-12 05:39:20 UTC (rev 9805) +++ branches/4-stable/doc/ja/html/about/history.html 2022-03-12 16:57:17 UTC (rev 9806) @@ -43,6 +43,7 @@ <ul> <li>TELNET.LOG\x82̃t\x83@\x83C\x83\x8B\x83n\x83\x93\x83h\x83\x8B\x82\xAA\x83N\x83\x8D\x81[\x83Y\x82ł\xAB\x82Ă\xA2\x82Ȃ\xA2\x96\xE2\x91\xE8\x82\xF0\x8FC\x90\xB3\x82\xB5\x82\xBD\x81B</li> <li>telnet(cygterm)\x90ڑ\xB1\x8E\x9E\x81ANAWS(Negotiate About Window Size)\x82\xAA\x91\x97\x82\xE7\x82\xEA\x82Ă\xAB\x82\xBD\x82Ƃ\xAB\x83E\x83B\x83\x93\x83h\x83E\x83T\x83C\x83Y\x82\xF0\x8C\xEB\x82\xC1\x82Đݒ肷\x82\xE9\x89\\x90\xAB\x82\xAA\x82\xA0\x82\xC1\x82\xBD\x82̂ŏC\x90\xB3\x81B</li> + <li><a href="../macro/command/filecreate.html">filecreate</a> \x83}\x83N\x83\x8D\x83R\x83}\x83\x93\x83h\x82ō쐬\x82\xB5\x82\xBD\x83t\x83@\x83C\x83\x8B\x82\xF0fileclose\x82\xB9\x82\xB8\x82ɓǂݍ\x9E\x82݂\xAA\x82ł\xAB\x82Ȃ\xA9\x82\xC1\x82\xBD\x82̂ŏC\x90\xB3\x81B4.102\x82ŃG\x83\x93\x83o\x83O\x81B</li> </ul> </li> Modified: branches/4-stable/teraterm/ttpmacro/ttl.c =================================================================== --- branches/4-stable/teraterm/ttpmacro/ttl.c 2022-03-12 05:39:20 UTC (rev 9805) +++ branches/4-stable/teraterm/ttpmacro/ttl.c 2022-03-12 16:57:17 UTC (rev 9806) @@ -1468,7 +1468,9 @@ SetResult(-1); return Err; } - FH = _lcreat(FName,0); + FH = CreateFileA(FName, + GENERIC_WRITE|GENERIC_READ, FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, + CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL); if (FH == INVALID_HANDLE_VALUE) { SetResult(2); }