• R/O
  • HTTP
  • SSH
  • HTTPS

コミット

よく使われているワード(クリックで追加)

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

Loweynet


コミットメタ情報

リビジョンf627556e02a23df8cd83d2742790a9efbdfe9dab (tree)
日時2012-07-28 16:36:18
作者s_kawamoto <s_kawamoto@user...>
コミッターs_kawamoto

ログメッセージ

Add support for uploading only files that are larger.

変更サマリ

差分

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/Resource/FFFTP.rc
+++ b/Resource/FFFTP.rc
@@ -778,21 +778,22 @@ BEGIN
778778 CONTROL "ƒtƒ@ƒCƒ‹–¼‚ð•Ï‚¦‚Ä“]‘—‚µ‚½ê‡‚ɃfƒBƒŒƒNƒgƒŠ‚ðì¬(&D)",TRMODE_MAKEDIR,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,136,196,10
779779 END
780780
781-up_exist_dlg DIALOG 0, 0, 223, 119
781+up_exist_dlg DIALOG 0, 0, 223, 131
782782 STYLE DS_SETFONT | DS_MODALFRAME | DS_SETFOREGROUND | WS_POPUP | WS_CAPTION
783783 CAPTION "ƒAƒbƒvƒ[ƒh‚ÌŠm”F"
784784 FONT 9, "MS Shell Dlg"
785785 BEGIN
786786 CONTROL "ã‘‚«(&O)",UP_EXIST_OVW,"Button",BS_AUTORADIOBUTTON | WS_GROUP,7,38,99,10
787787 CONTROL "V‚µ‚¯‚ê‚Ώ㏑‚«(&T)",UP_EXIST_NEW,"Button",BS_AUTORADIOBUTTON,7,50,99,10
788- CONTROL "ÄŠJiƒŠƒWƒ…[ƒ€j(&R)",UP_EXIST_RESUME,"Button",BS_AUTORADIOBUTTON,7,62,99,10
789- CONTROL "ƒzƒXƒg‚ª–¼‘O‚ð•t‚¯‚é(&M)",UP_EXIST_UNIQUE,"Button",BS_AUTORADIOBUTTON,7,74,99,10
790- CONTROL "ƒAƒbƒvƒ[ƒh‚µ‚È‚¢(&N)",UP_EXIST_IGNORE,"Button",BS_AUTORADIOBUTTON,7,86,99,10
788+ CONTROL "‘å‚«‚¯‚ê‚Ώ㏑‚«(&L)",UP_EXIST_LARGE,"Button",BS_AUTORADIOBUTTON,7,62,99,10
789+ CONTROL "ÄŠJiƒŠƒWƒ…[ƒ€j(&R)",UP_EXIST_RESUME,"Button",BS_AUTORADIOBUTTON,7,74,99,10
790+ CONTROL "ƒzƒXƒg‚ª–¼‘O‚ð•t‚¯‚é(&M)",UP_EXIST_UNIQUE,"Button",BS_AUTORADIOBUTTON,7,86,99,10
791+ CONTROL "ƒAƒbƒvƒ[ƒh‚µ‚È‚¢(&N)",UP_EXIST_IGNORE,"Button",BS_AUTORADIOBUTTON,7,98,99,10
791792 LTEXT "ˆá‚¤–¼‘O‚ŃAƒbƒvƒ[ƒh‚·‚鎞‚́A–¼‘O‚ð•ÏX‚µ‚āuã‘‚«v‚ð‰Ÿ‚µ‚Ä‚­‚¾‚³‚¢B",-1,113,39,103,41
792- DEFPUSHBUTTON "OK",IDOK,8,101,50,14,WS_GROUP
793- PUSHBUTTON "ˆÈ~‘S‚Ä(&A)",IDOK_ALL,63,101,50,14
794- PUSHBUTTON "‘S‚Ä’†Ž~(&S)",IDCANCEL,118,101,50,14
795- PUSHBUTTON "ƒwƒ‹ƒv",9,173,101,41,14
793+ DEFPUSHBUTTON "OK",IDOK,8,113,50,14,WS_GROUP
794+ PUSHBUTTON "ˆÈ~‘S‚Ä(&A)",IDOK_ALL,63,113,50,14
795+ PUSHBUTTON "‘S‚Ä’†Ž~(&S)",IDCANCEL,118,113,50,14
796+ PUSHBUTTON "ƒwƒ‹ƒv",9,173,113,41,14
796797 LTEXT "ƒzƒXƒg‚É“¯‚¶–¼‘O‚̃tƒ@ƒCƒ‹‚ª‚ ‚è‚Ü‚·",-1,7,7,184,8
797798 EDITTEXT UP_EXIST_NAME,7,20,209,12,ES_AUTOHSCROLL
798799 END
@@ -1309,20 +1310,21 @@ BEGIN
13091310 PUSHBUTTON "ƒLƒƒƒ“ƒZƒ‹",IDCANCEL,101,65,50,14
13101311 END
13111312
1312-down_exist_dlg DIALOG 0, 0, 223, 108
1313+down_exist_dlg DIALOG 0, 0, 223, 120
13131314 STYLE DS_SETFONT | DS_MODALFRAME | DS_SETFOREGROUND | WS_POPUP | WS_CAPTION
13141315 CAPTION "ƒ_ƒEƒ“ƒ[ƒh‚ÌŠm”F"
13151316 FONT 9, "MS Shell Dlg"
13161317 BEGIN
13171318 CONTROL "ã‘‚«(&O)",DOWN_EXIST_OVW,"Button",BS_AUTORADIOBUTTON | WS_GROUP,7,39,99,10
13181319 CONTROL "V‚µ‚¯‚ê‚Ώ㏑‚«(&T)",DOWN_EXIST_NEW,"Button",BS_AUTORADIOBUTTON,7,51,99,10
1319- CONTROL "ÄŠJiƒŠƒWƒ…[ƒ€j(&R)",DOWN_EXIST_RESUME,"Button",BS_AUTORADIOBUTTON,7,63,99,10
1320- CONTROL "ƒ_ƒEƒ“ƒ[ƒh‚µ‚È‚¢(&N)",DOWN_EXIST_IGNORE,"Button",BS_AUTORADIOBUTTON,7,75,99,10
1320+ CONTROL "‘å‚«‚¯‚ê‚Ώ㏑‚«(&L)",DOWN_EXIST_LARGE,"Button",BS_AUTORADIOBUTTON,7,63,99,10
1321+ CONTROL "ÄŠJiƒŠƒWƒ…[ƒ€j(&R)",DOWN_EXIST_RESUME,"Button",BS_AUTORADIOBUTTON,7,75,99,10
1322+ CONTROL "ƒ_ƒEƒ“ƒ[ƒh‚µ‚È‚¢(&N)",DOWN_EXIST_IGNORE,"Button",BS_AUTORADIOBUTTON,7,87,99,10
13211323 LTEXT "ˆá‚¤–¼‘O‚Ń_ƒEƒ“ƒ[ƒh‚·‚鎞‚́A–¼‘O‚ð•ÏX‚µ‚āuã‘‚«v‚ð‰Ÿ‚µ‚Ä‚­‚¾‚³‚¢B",-1,113,40,103,39
1322- DEFPUSHBUTTON "OK",IDOK,8,90,50,14,WS_GROUP
1323- PUSHBUTTON "ˆÈ~‘S‚Ä(&A)",IDOK_ALL,63,90,50,14
1324- PUSHBUTTON "‘S‚Ä’†Ž~(&S)",IDCANCEL,118,90,50,14
1325- PUSHBUTTON "ƒwƒ‹ƒv",9,173,90,41,14
1324+ DEFPUSHBUTTON "OK",IDOK,8,102,50,14,WS_GROUP
1325+ PUSHBUTTON "ˆÈ~‘S‚Ä(&A)",IDOK_ALL,63,102,50,14
1326+ PUSHBUTTON "‘S‚Ä’†Ž~(&S)",IDCANCEL,118,102,50,14
1327+ PUSHBUTTON "ƒwƒ‹ƒv",9,173,102,41,14
13261328 LTEXT "ƒ[ƒJƒ‹‘¤‚É“¯‚¶–¼‘O‚̃tƒ@ƒCƒ‹‚ª‚ ‚è‚Ü‚·",-1,7,7,184,8
13271329 EDITTEXT DOWN_EXIST_NAME,7,20,209,12,ES_AUTOHSCROLL
13281330 END
@@ -1702,7 +1704,7 @@ BEGIN
17021704 LEFTMARGIN, 7
17031705 RIGHTMARGIN, 216
17041706 TOPMARGIN, 7
1705- BOTTOMMARGIN, 115
1707+ BOTTOMMARGIN, 127
17061708 END
17071709
17081710 reginit_dlg, DIALOG
@@ -2022,7 +2024,7 @@ BEGIN
20222024 LEFTMARGIN, 7
20232025 RIGHTMARGIN, 216
20242026 TOPMARGIN, 7
2025- BOTTOMMARGIN, 104
2027+ BOTTOMMARGIN, 116
20262028 END
20272029
20282030 IDD_OLEDRAG, DIALOG
--- a/Resource/resource.h
+++ b/Resource/resource.h
@@ -444,6 +444,8 @@
444444 #define HSET_NETTYPE 1210
445445 #define HSET_ERROR_MODE 1211
446446 #define HSET_MLSDCMD 1212
447+#define DOWN_EXIST_LARGE 1213
448+#define UP_EXIST_LARGE 1214
447449 #define MENU_END 40001
448450 #define MENU_EXIT 40001
449451 #define MENU_CONNECT 40003
@@ -632,7 +634,7 @@
632634 #ifndef APSTUDIO_READONLY_SYMBOLS
633635 #define _APS_NEXT_RESOURCE_VALUE 195
634636 #define _APS_NEXT_COMMAND_VALUE 40177
635-#define _APS_NEXT_CONTROL_VALUE 1213
637+#define _APS_NEXT_CONTROL_VALUE 1215
636638 #define _APS_NEXT_SYMED_VALUE 101
637639 #endif
638640 #endif
--- a/Resource_eng/FFFTP-eng.rc
+++ b/Resource_eng/FFFTP-eng.rc
@@ -787,21 +787,22 @@ BEGIN
787787 "Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,136,196,10
788788 END
789789
790-up_exist_dlg DIALOG 0, 0, 234, 119
790+up_exist_dlg DIALOG 0, 0, 234, 131
791791 STYLE DS_SETFONT | DS_MODALFRAME | DS_SETFOREGROUND | WS_POPUP | WS_CAPTION
792792 CAPTION "Upload"
793793 FONT 9, "MS Shell Dlg"
794794 BEGIN
795795 CONTROL "&Overwrite existing file",UP_EXIST_OVW,"Button",BS_AUTORADIOBUTTON | WS_GROUP,8,38,99,10
796796 CONTROL "Overwrite if upload file is &newer",UP_EXIST_NEW,"Button",BS_AUTORADIOBUTTON,7,50,118,10
797- CONTROL "&Resume",UP_EXIST_RESUME,"Button",BS_AUTORADIOBUTTON,7,62,99,10
798- CONTROL "Rename &by the host",UP_EXIST_UNIQUE,"Button",BS_AUTORADIOBUTTON,7,74,99,10
799- CONTROL "&Skip",UP_EXIST_IGNORE,"Button",BS_AUTORADIOBUTTON,7,86,99,10
797+ CONTROL "Overwrite if upload file is &larger",UP_EXIST_LARGE,"Button",BS_AUTORADIOBUTTON,7,62,118,10
798+ CONTROL "&Resume",UP_EXIST_RESUME,"Button",BS_AUTORADIOBUTTON,7,74,99,10
799+ CONTROL "Rename &by the host",UP_EXIST_UNIQUE,"Button",BS_AUTORADIOBUTTON,7,86,99,10
800+ CONTROL "&Skip",UP_EXIST_IGNORE,"Button",BS_AUTORADIOBUTTON,7,98,99,10
800801 LTEXT "To upload with a different name, modify the filename and click Overwrite existing file.",-1,129,39,98,41
801- DEFPUSHBUTTON "OK",IDOK,13,101,50,14,WS_GROUP
802- PUSHBUTTON "&Do All",IDOK_ALL,68,101,50,14
803- PUSHBUTTON "&Cancel All",IDCANCEL,123,101,50,14
804- PUSHBUTTON "&Help",9,178,101,41,14
802+ DEFPUSHBUTTON "OK",IDOK,13,113,50,14,WS_GROUP
803+ PUSHBUTTON "&Do All",IDOK_ALL,68,113,50,14
804+ PUSHBUTTON "&Cancel All",IDCANCEL,123,113,50,14
805+ PUSHBUTTON "&Help",9,178,113,41,14
805806 LTEXT "Filename already exists on host. Upload?",-1,7,7,184,8
806807 EDITTEXT UP_EXIST_NAME,7,20,220,12,ES_AUTOHSCROLL
807808 END
@@ -1335,7 +1336,7 @@ BEGIN
13351336 PUSHBUTTON "Cancel",IDCANCEL,101,65,50,14
13361337 END
13371338
1338-down_exist_dlg DIALOG 0, 0, 234, 109
1339+down_exist_dlg DIALOG 0, 0, 234, 121
13391340 STYLE DS_SETFONT | DS_MODALFRAME | DS_SETFOREGROUND | WS_POPUP | WS_CAPTION
13401341 CAPTION "Download"
13411342 FONT 9, "MS Shell Dlg"
@@ -1343,13 +1344,15 @@ BEGIN
13431344 CONTROL "&Overwrite existing file",DOWN_EXIST_OVW,"Button",BS_AUTORADIOBUTTON | WS_GROUP,7,39,99,10
13441345 CONTROL "Overwrite if download file is &newer",DOWN_EXIST_NEW,
13451346 "Button",BS_AUTORADIOBUTTON,7,51,123,10
1346- CONTROL "&Resume",DOWN_EXIST_RESUME,"Button",BS_AUTORADIOBUTTON,7,63,99,10
1347- CONTROL "&Skip",DOWN_EXIST_IGNORE,"Button",BS_AUTORADIOBUTTON,7,75,99,10
1347+ CONTROL "Overwrite if download file is &larger",DOWN_EXIST_LARGE,
1348+ "Button",BS_AUTORADIOBUTTON,7,63,123,10
1349+ CONTROL "&Resume",DOWN_EXIST_RESUME,"Button",BS_AUTORADIOBUTTON,7,75,99,10
1350+ CONTROL "&Skip",DOWN_EXIST_IGNORE,"Button",BS_AUTORADIOBUTTON,7,87,99,10
13481351 LTEXT "To download with a different name, modify the filename and click Overwrite existing file.",-1,133,38,94,39
1349- DEFPUSHBUTTON "OK",IDOK,13,91,50,14,WS_GROUP
1350- PUSHBUTTON "&Do All",IDOK_ALL,68,91,50,14
1351- PUSHBUTTON "&Cancel All",IDCANCEL,123,91,50,14
1352- PUSHBUTTON "&Help",9,178,91,41,14
1352+ DEFPUSHBUTTON "OK",IDOK,13,103,50,14,WS_GROUP
1353+ PUSHBUTTON "&Do All",IDOK_ALL,68,103,50,14
1354+ PUSHBUTTON "&Cancel All",IDCANCEL,123,103,50,14
1355+ PUSHBUTTON "&Help",9,178,103,41,14
13531356 LTEXT "Filename already exists on local disk. Download?",-1,7,7,184,8
13541357 EDITTEXT DOWN_EXIST_NAME,7,20,220,12,ES_AUTOHSCROLL
13551358 END
@@ -1731,7 +1734,7 @@ BEGIN
17311734 LEFTMARGIN, 7
17321735 RIGHTMARGIN, 227
17331736 TOPMARGIN, 7
1734- BOTTOMMARGIN, 115
1737+ BOTTOMMARGIN, 127
17351738 END
17361739
17371740 reginit_dlg, DIALOG
@@ -2051,7 +2054,7 @@ BEGIN
20512054 LEFTMARGIN, 7
20522055 RIGHTMARGIN, 227
20532056 TOPMARGIN, 7
2054- BOTTOMMARGIN, 105
2057+ BOTTOMMARGIN, 117
20552058 END
20562059
20572060 IDD_OLEDRAG, DIALOG
--- a/Resource_eng/resource.h
+++ b/Resource_eng/resource.h
@@ -444,6 +444,8 @@
444444 #define HSET_NETTYPE 1210
445445 #define HSET_ERROR_MODE 1211
446446 #define HSET_MLSDCMD 1212
447+#define DOWN_EXIST_LARGE 1213
448+#define UP_EXIST_LARGE 1214
447449 #define MENU_END 40001
448450 #define MENU_EXIT 40001
449451 #define MENU_CONNECT 40003
@@ -632,7 +634,7 @@
632634 #ifndef APSTUDIO_READONLY_SYMBOLS
633635 #define _APS_NEXT_RESOURCE_VALUE 195
634636 #define _APS_NEXT_COMMAND_VALUE 40177
635-#define _APS_NEXT_CONTROL_VALUE 1213
637+#define _APS_NEXT_CONTROL_VALUE 1215
636638 #define _APS_NEXT_SYMED_VALUE 101
637639 #endif
638640 #endif
--- a/common.h
+++ b/common.h
@@ -164,6 +164,8 @@
164164 #define EXIST_IGNORE 3 /* 無視 */
165165 #define EXIST_UNIQUE 4 /* ホストが名前を付ける */
166166 #define EXIST_ABORT 5 /* 全て中止 */
167+// 同じ名前のファイルの処理方法追加
168+#define EXIST_LARGE 6 /* 大きければ上書き */
167169
168170 /*===== ファイル名の比較モード =====*/
169171
--- a/ftpproc.c
+++ b/ftpproc.c
@@ -872,6 +872,14 @@ static int CheckLocalFile(TRANSPACKET *Pkt)
872872 else
873873 Ret = EXIST_IGNORE;
874874 }
875+ // 同じ名前のファイルの処理方法追加
876+ if(Ret == EXIST_LARGE)
877+ {
878+ if(MakeLongLong(Find.nFileSizeHigh, Find.nFileSizeLow) < Pkt->Size)
879+ Ret = EXIST_OVW;
880+ else
881+ Ret = EXIST_IGNORE;
882+ }
875883 }
876884 }
877885 return(Ret);
@@ -895,11 +903,19 @@ static int CheckLocalFile(TRANSPACKET *Pkt)
895903 static INT_PTR CALLBACK DownExistDialogCallBack(HWND hDlg, UINT iMessage, WPARAM wParam, LPARAM lParam)
896904 {
897905 static TRANSPACKET *Pkt;
906+ // 同じ名前のファイルの処理方法追加
907+// static const RADIOBUTTON DownExistButton[] = {
908+// { DOWN_EXIST_OVW, EXIST_OVW },
909+// { DOWN_EXIST_NEW, EXIST_NEW },
910+// { DOWN_EXIST_RESUME, EXIST_RESUME },
911+// { DOWN_EXIST_IGNORE, EXIST_IGNORE }
912+// };
898913 static const RADIOBUTTON DownExistButton[] = {
899914 { DOWN_EXIST_OVW, EXIST_OVW },
900915 { DOWN_EXIST_NEW, EXIST_NEW },
901916 { DOWN_EXIST_RESUME, EXIST_RESUME },
902- { DOWN_EXIST_IGNORE, EXIST_IGNORE }
917+ { DOWN_EXIST_IGNORE, EXIST_IGNORE },
918+ { DOWN_EXIST_LARGE, EXIST_LARGE }
903919 };
904920 #define DOWNEXISTBUTTONS (sizeof(DownExistButton)/sizeof(RADIOBUTTON))
905921
@@ -1158,7 +1174,9 @@ void UploadListProc(int ChName, int All)
11581174
11591175 strcpy(Pkt.Cmd, "STOR ");
11601176 Pkt.Type = AskTransferTypeAssoc(Pkt.LocalFile, AskTransferType());
1161- Pkt.Size = 0;
1177+ // バグ修正
1178+// Pkt.Size = 0;
1179+ Pkt.Size = Pos->Size;
11621180 Pkt.Time = Pos->Time;
11631181 Pkt.Attr = AskUploadFileAttr(Pkt.RemoteFile);
11641182 Pkt.KanjiCode = AskHostKanjiCode();
@@ -1336,7 +1354,9 @@ void UploadDragProc(WPARAM wParam)
13361354
13371355 strcpy(Pkt.Cmd, "STOR ");
13381356 Pkt.Type = AskTransferTypeAssoc(Pkt.LocalFile, AskTransferType());
1339- Pkt.Size = 0;
1357+ // バグ修正
1358+// Pkt.Size = 0;
1359+ Pkt.Size = Pos->Size;
13401360 Pkt.Time = Pos->Time;
13411361 Pkt.Attr = AskUploadFileAttr(Pkt.RemoteFile);
13421362 Pkt.KanjiCode = AskHostKanjiCode();
@@ -1625,7 +1645,9 @@ void MirrorUploadProc(int Notify)
16251645
16261646 strcpy(Pkt.Cmd, "STOR ");
16271647 Pkt.Type = AskTransferTypeAssoc(Pkt.LocalFile, AskTransferType());
1628- Pkt.Size = 0;
1648+ // バグ修正
1649+// Pkt.Size = 0;
1650+ Pkt.Size = LocalPos->Size;
16291651 Pkt.Time = LocalPos->Time;
16301652 Pkt.Attr = AskUploadFileAttr(Pkt.RemoteFile);
16311653 Pkt.KanjiCode = AskHostKanjiCode();
@@ -2087,6 +2109,14 @@ static int CheckRemoteFile(TRANSPACKET *Pkt, FILELIST *ListList)
20872109 else
20882110 Ret = EXIST_IGNORE;
20892111 }
2112+ // 同じ名前のファイルの処理方法追加
2113+ if(Ret == EXIST_LARGE)
2114+ {
2115+ if(Exist->Size < Pkt->Size)
2116+ Ret = EXIST_OVW;
2117+ else
2118+ Ret = EXIST_IGNORE;
2119+ }
20902120 }
20912121 }
20922122 return(Ret);
@@ -2110,12 +2140,21 @@ static int CheckRemoteFile(TRANSPACKET *Pkt, FILELIST *ListList)
21102140 static INT_PTR CALLBACK UpExistDialogCallBack(HWND hDlg, UINT iMessage, WPARAM wParam, LPARAM lParam)
21112141 {
21122142 static TRANSPACKET *Pkt;
2143+ // 同じ名前のファイルの処理方法追加
2144+// static const RADIOBUTTON UpExistButton[] = {
2145+// { UP_EXIST_OVW, EXIST_OVW },
2146+// { UP_EXIST_NEW, EXIST_NEW },
2147+// { UP_EXIST_RESUME, EXIST_RESUME },
2148+// { UP_EXIST_UNIQUE, EXIST_UNIQUE },
2149+// { UP_EXIST_IGNORE, EXIST_IGNORE }
2150+// };
21132151 static const RADIOBUTTON UpExistButton[] = {
21142152 { UP_EXIST_OVW, EXIST_OVW },
21152153 { UP_EXIST_NEW, EXIST_NEW },
21162154 { UP_EXIST_RESUME, EXIST_RESUME },
21172155 { UP_EXIST_UNIQUE, EXIST_UNIQUE },
2118- { UP_EXIST_IGNORE, EXIST_IGNORE }
2156+ { UP_EXIST_IGNORE, EXIST_IGNORE },
2157+ { UP_EXIST_LARGE, EXIST_LARGE }
21192158 };
21202159 #define UPEXISTBUTTONS (sizeof(UpExistButton)/sizeof(RADIOBUTTON))
21212160