• R/O
  • HTTP
  • SSH
  • HTTPS

提交

标签
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

FFFTPのソースコードです。


Commit MetaInfo

修订版c16fea1548774bded6901c861158d9e648582259 (tree)
时间2012-05-21 23:11:57
作者s_kawamoto <s_kawamoto@user...>
Commiters_kawamoto

Log Message

Add routines for checking capability of MDTM and MFMT.

更改概述

差异

Binary files a/FFFTP_Eng_Release/FFFTP.exe and b/FFFTP_Eng_Release/FFFTP.exe differ
Binary files a/Release/FFFTP.exe and b/Release/FFFTP.exe differ
--- a/common.h
+++ b/common.h
@@ -938,6 +938,10 @@ LIST_UNIX_70
938938 // IPv6対応
939939 #define FEATURE_EPRT 0x00000004
940940 #define FEATURE_EPSV 0x00000008
941+// ホスト側の日時取得
942+#define FEATURE_MDTM 0x00000010
943+// ホスト側の日時設定
944+#define FEATURE_MFMT 0x00000020
941945
942946 // IPv6対応
943947 #define NTYPE_AUTO 0 /* 自動 */
--- a/connect.c
+++ b/connect.c
@@ -1773,6 +1773,12 @@ static SOCKET DoConnectCrypt(int CryptMode, HOSTDATA* HostData, char *Host, char
17731773 // IPv6対応
17741774 if(strstr(Reply, " EPRT ") || strstr(Reply, " EPSV "))
17751775 HostData->Feature |= FEATURE_EPRT | FEATURE_EPSV;
1776+ // ホスト側の日時取得
1777+ if(strstr(Reply, " MDTM "))
1778+ HostData->Feature |= FEATURE_MDTM;
1779+ // ホスト側の日時設定
1780+ if(strstr(Reply, " MFMT "))
1781+ HostData->Feature |= FEATURE_MFMT;
17761782 }
17771783 // UTF-8対応
17781784 if(HostData->CurNameKanjiCode == KANJI_AUTO && (HostData->Feature & FEATURE_UTF8))
--- a/remote.c
+++ b/remote.c
@@ -441,8 +441,11 @@ int DoMDTM(SOCKET cSkt, char *Path, FILETIME *Time, int *CancelCheckWork)
441441 Time->dwHighDateTime = 0;
442442
443443 // 同時接続対応
444+ // ホスト側の日時取得
444445 // Sts = CommandProcTrn(Tmp, "MDTM %s", Path);
445- Sts = CommandProcTrn(cSkt, Tmp, CancelCheckWork, "MDTM %s", Path);
446+ Sts = 500;
447+ if(AskHostFeature() & FEATURE_MDTM)
448+ Sts = CommandProcTrn(cSkt, Tmp, CancelCheckWork, "MDTM %s", Path);
446449 if(Sts/100 == FTP_COMPLETE)
447450 {
448451 sTime.wMilliseconds = 0;
@@ -469,7 +472,9 @@ int DoMFMT(SOCKET cSkt, char *Path, FILETIME *Time, int *CancelCheckWork)
469472
470473 FileTimeToSystemTime(Time, &sTime);
471474
472- Sts = CommandProcTrn(cSkt, Tmp, CancelCheckWork, "MFMT %04d%02d%02d%02d%02d%02d %s", sTime.wYear, sTime.wMonth, sTime.wDay, sTime.wHour, sTime.wMinute, sTime.wSecond, Path);
475+ Sts = 500;
476+ if(AskHostFeature() & FEATURE_MFMT)
477+ Sts = CommandProcTrn(cSkt, Tmp, CancelCheckWork, "MFMT %04d%02d%02d%02d%02d%02d %s", sTime.wYear, sTime.wMonth, sTime.wDay, sTime.wHour, sTime.wMinute, sTime.wSecond, Path);
473478 return(Sts/100);
474479 }
475480