svnno****@sourc*****
svnno****@sourc*****
2016年 8月 1日 (月) 18:01:17 JST
Revision: 6451 http://sourceforge.jp/projects/ttssh2/scm/svn/commits/6451 Author: doda Date: 2016-08-01 18:01:16 +0900 (Mon, 01 Aug 2016) Log Message: ----------- hoge.txt:fuga のような名前のファイルを scp 受信した時に代替データ ストリームとして扱われるのを防ぐ為、ファイル名に使えない文字を _ に 置換するようにした。 Modified Paths: -------------- trunk/doc/en/html/about/history.html trunk/doc/ja/html/about/history.html trunk/teraterm/ttpcmn/ttpcmn.def trunk/ttssh2/ttxssh/ttxssh.c -------------- next part -------------- Modified: trunk/doc/en/html/about/history.html =================================================================== --- trunk/doc/en/html/about/history.html 2016-07-15 13:45:42 UTC (rev 6450) +++ trunk/doc/en/html/about/history.html 2016-08-01 09:01:16 UTC (rev 6451) @@ -63,6 +63,7 @@ <li>Misc <ul> + <li>upgraded TTSSH to <a href="#ttssh_2.78">2.78</a></li> <li>upgraded TTProxy to <a href="#ttproxy_1.0.0.23">1.0.0.23</a></li> </ul> </li> @@ -2769,6 +2770,27 @@ <h2><a name="ttssh">TTSSH</a></h2> +<h3><a name="ttssh_2.78">2016.xx.xx (Ver 2.78)</a></h3> +<ul class="history"> + <li>Changes + <ul> + <!-- li>scp \x82ł̃t\x83@\x83C\x83\x8B\x8E\xF3\x90M\x82ŁA\x83t\x83@\x83C\x83\x8B\x96\xBC\x82Ɏg\x82\xA6\x82Ȃ\xA2\x95\xB6\x8E\x9A\x82\xAA\x8A܂܂\xEA\x82Ă\xA2\x82\xBD\x8Fꍇ\x82́A\x82\xBB\x82̕\xB6\x8E\x9A\x82\xF0 _ \x82ɒu\x82\xAB\x8A\xB7\x82\xA6\x82\xE9\x82悤\x82ɂ\xB5\x82\xBD\x81B</li --> + </ul> + </li> + + <!-- li>Bug fixes + <ul> + <li></li> + </ul> + </li --> + + <!-- li>Misc + <ul> + <li></li> + </ul> + </li --> +</ul> + <h3><a name="ttssh_2.77">2016.05.31 (Ver 2.77)</a></h3> <ul class="history"> <li>Changes Modified: trunk/doc/ja/html/about/history.html =================================================================== --- trunk/doc/ja/html/about/history.html 2016-07-15 13:45:42 UTC (rev 6450) +++ trunk/doc/ja/html/about/history.html 2016-08-01 09:01:16 UTC (rev 6451) @@ -63,6 +63,7 @@ <li>\x82\xBB\x82̑\xBC <ul> + <li><a href="#ttssh_2.78">TTSSH(2.78)</a>\x82֍\xB7\x82\xB5\x91ւ\xA6\x82\xBD\x81B</li> <li><a href="#ttproxy_1.0.0.23">TTProxy(1.0.0.23)</a>\x82֍\xB7\x82\xB5\x91ւ\xA6\x82\xBD\x81B</li> </ul> </li> @@ -2774,6 +2775,27 @@ <h2><a name="ttssh">TTSSH</a></h2> +<h3><a name="ttssh_2.78">2016.xx.xx (Ver 2.78)</a></h3> +<ul class="history"> + <li>\x95ύX + <ul> + <li>scp \x82ł̃t\x83@\x83C\x83\x8B\x8E\xF3\x90M\x82ŁA\x83t\x83@\x83C\x83\x8B\x96\xBC\x82Ɏg\x82\xA6\x82Ȃ\xA2\x95\xB6\x8E\x9A\x82\xAA\x8A܂܂\xEA\x82Ă\xA2\x82\xBD\x8Fꍇ\x82ɁA\x82\xBB\x82̕\xB6\x8E\x9A\x82\xF0 _ \x82ɒu\x82\xAB\x8A\xB7\x82\xA6\x82\xE9\x82悤\x82ɂ\xB5\x82\xBD\x81B</li> + </ul> + </li> + + <!-- li>\x83o\x83O\x8FC\x90\xB3 + <ul> + <li></li> + </ul> + </li --> + + <!-- li>\x82\xBB\x82̑\xBC + <ul> + <li></li> + </ul> + </li --> +</ul> + <h3><a name="ttssh_2.77">2016.05.31 (Ver 2.77)</a></h3> <ul class="history"> <li>\x95ύX Modified: trunk/teraterm/ttpcmn/ttpcmn.def =================================================================== --- trunk/teraterm/ttpcmn/ttpcmn.def 2016-07-15 13:45:42 UTC (rev 6450) +++ trunk/teraterm/ttpcmn/ttpcmn.def 2016-08-01 09:01:16 UTC (rev 6451) @@ -27,6 +27,7 @@ DetectComPorts @42 GetDefaultFName @47 ExtractFileName @48 + replaceInvalidFileNameChar @74 SJIS2JIS @30 SJIS2EUC @31 Modified: trunk/ttssh2/ttxssh/ttxssh.c =================================================================== --- trunk/ttssh2/ttxssh/ttxssh.c 2016-07-15 13:45:42 UTC (rev 6450) +++ trunk/ttssh2/ttxssh/ttxssh.c 2016-08-01 09:01:16 UTC (rev 6451) @@ -4522,11 +4522,20 @@ if (szFileName[0] != '\0') { char recvpath[MAX_PATH] = ""; char* fn = strrchr(szFileName, '/'); - if (fn && fn[1] == '\0') { - return FALSE; + char recvfn[sizeof(szFileName)]; + if (fn) { + fn++; + if (*fn == '\0') { + return FALSE; + } } + else { + fn = szFileName; + } + strncpy_s(recvfn, sizeof(recvfn), fn, _TRUNCATE); + replaceInvalidFileNameChar(recvfn, '_'); SendMessage(GetDlgItem(dlg, IDC_RECVFILE_TO), WM_GETTEXT, sizeof(recvdir), (LPARAM)recvdir); - _snprintf_s(recvpath, sizeof(recvpath), _TRUNCATE, "%s\\%s", recvdir, fn ? (fn + 1) : szFileName); + _snprintf_s(recvpath, sizeof(recvpath), _TRUNCATE, "%s\\%s", recvdir, recvfn); SSH_scp_transaction(pvar, szFileName, recvpath, FROMREMOTE); EndDialog(dlg, 1); // dialog close return TRUE;