OSDN Git Service

Add extensions of files that will be transferred in ASCII mode.
authors_kawamoto <s_kawamoto@users.sourceforge.jp>
Wed, 25 Apr 2012 11:33:57 +0000 (20:33 +0900)
committers_kawamoto <s_kawamoto@users.sourceforge.jp>
Wed, 25 Apr 2012 11:33:57 +0000 (20:33 +0900)
Fix bugs of converting old type extensions lists.

FFFTP_Eng_Release/FFFTP.exe
Release/FFFTP.exe
main.c
registry.c

index 602dd6f..596ae63 100644 (file)
Binary files a/FFFTP_Eng_Release/FFFTP.exe and b/FFFTP_Eng_Release/FFFTP.exe differ
index e3d3ff8..b2b7816 100644 (file)
Binary files a/Release/FFFTP.exe and b/Release/FFFTP.exe differ
diff --git a/main.c b/main.c
index 52fc39d..a83a46a 100644 (file)
--- a/main.c
+++ b/main.c
@@ -176,7 +176,9 @@ int TransMode = TYPE_X;
 int ConnectOnStart = YES;\r
 int DebugConsole = NO;\r
 int SaveWinPos = NO;\r
-char AsciiExt[ASCII_EXT_LEN+1] = { "*.txt\0*.html\0*.htm\0*.cgi\0*.pl\0" };\r
+// アスキーモード判別の改良\r
+//char AsciiExt[ASCII_EXT_LEN+1] = { "*.txt\0*.html\0*.htm\0*.cgi\0*.pl\0" };\r
+char AsciiExt[ASCII_EXT_LEN+1] = { "*.txt\0*.html\0*.htm\0*.cgi\0*.pl\0*.js\0*.vbs\0*.css\0*.rss\0*.rdf\0*.xml\0*.xhtml\0*.xht\0*.shtml\0*.shtm\0*.sh\0*.py\0*.rb\0" };\r
 int RecvMode = TRANS_DLG;\r
 int SendMode = TRANS_DLG;\r
 int MoveMode = MOVE_DLG;\r
index f2f7e05..cf989f9 100644 (file)
@@ -748,8 +748,12 @@ int LoadRegistry(void)
                        if(ReadMultiStringFromReg(hKey4, "AsciiFile", AsciiExt, ASCII_EXT_LEN+1) == FFFTP_FAIL)\r
                        {\r
                                /* 旧ASCIIモードの拡張子の設定を新しいものに変換 */\r
-                               ReadStringFromReg(hKey4, "Ascii", Str, ASCII_EXT_LEN+1);\r
-                               memset(AsciiExt, NUL, ASCII_EXT_LEN+1);\r
+                               // アスキーモード判別の改良\r
+//                             ReadStringFromReg(hKey4, "Ascii", Str, ASCII_EXT_LEN+1);\r
+//                             memset(AsciiExt, NUL, ASCII_EXT_LEN+1);\r
+                               Str[0] = NUL;\r
+                               if(ReadStringFromReg(hKey4, "Ascii", Str, ASCII_EXT_LEN+1) == FFFTP_SUCCESS)\r
+                                       memset(AsciiExt, NUL, ASCII_EXT_LEN+1);\r
                                Pos = Str;\r
                                while(*Pos != NUL)\r
                                {\r