svnno****@sourc*****
svnno****@sourc*****
2015年 2月 2日 (月) 00:06:02 JST
Revision: 5772 http://sourceforge.jp/projects/ttssh2/scm/svn/commits/5772 Author: maya Date: 2015-02-02 00:06:00 +0900 (Mon, 02 Feb 2015) Log Message: ----------- YMODEM 受信でファイルサイズが送られてこなかった場合、ファイルの内容が書き込まれない問題を修正 http://sourceforge.jp/ticket/browse.php?tid=34235&group_id=1412 Modified Paths: -------------- trunk/teraterm/common/ttftypes.h trunk/teraterm/ttpfile/ymodem.c -------------- next part -------------- Modified: trunk/teraterm/common/ttftypes.h =================================================================== --- trunk/teraterm/common/ttftypes.h 2015-01-31 13:47:26 UTC (rev 5771) +++ trunk/teraterm/common/ttftypes.h 2015-02-01 15:06:00 UTC (rev 5772) @@ -217,6 +217,7 @@ int LastSendEot; WORD DataLen; BYTE LastMessage; + BOOL RecvFilesize; } TYVar; typedef TYVar far *PYVar; Modified: trunk/teraterm/ttpfile/ymodem.c =================================================================== --- trunk/teraterm/ttpfile/ymodem.c 2015-01-31 13:47:26 UTC (rev 5771) +++ trunk/teraterm/ttpfile/ymodem.c 2015-02-01 15:06:00 UTC (rev 5772) @@ -245,6 +245,7 @@ fv->FileHandle = -1; fv->FileSize = 0; fv->FileMtime = 0; + yv->RecvFilesize = FALSE; } fv->FileOpen = fv->FileHandle>0; @@ -563,6 +564,7 @@ ret = sscanf(nameend, "%ld%lo%o", &bytes_total, &modtime, &mode); if (ret >= 1) { fv->FileSize = bytes_total; + yv->RecvFilesize = TRUE; } if (ret >= 2) { fv->FileMtime = modtime; @@ -589,7 +591,7 @@ c--; // \x8DŏI\x83u\x83\x8D\x83b\x83N\x82̗]\x95\xAA\x82ȃf\x81[\x83^\x82\xF0\x8F\x9C\x8B\x8E\x82\xB7\x82\xE9 - if (fv->ByteCount + c > fv->FileSize) { + if (yv->RecvFilesize && fv->ByteCount + c > fv->FileSize) { c = fv->FileSize - fv->ByteCount; }