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
Pos++;\r
}\r
}\r
+ // アスキーモード判別の改良\r
+ if(Version < 1986)\r
+ {\r
+ Pos = "*.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*.properties\0*.sql\0*.asp\0*.aspx\0*.php\0*.htaccess\0";\r
+ while(*Pos != NUL)\r
+ {\r
+ Pos2 = AsciiExt;\r
+ while(*Pos2 != NUL)\r
+ {\r
+ if(_stricmp(Pos2, Pos) == 0)\r
+ break;\r
+ Pos2 = strchr(Pos2, NUL) + 1;\r
+ }\r
+ if(*Pos2 == NUL)\r
+ {\r
+ if((StrMultiLen(AsciiExt) + strlen(Pos) + 2) < ASCII_EXT_LEN)\r
+ strncpy(AsciiExt + StrMultiLen(AsciiExt), Pos, strlen(Pos) + 2);\r
+ }\r
+ Pos = strchr(Pos, NUL) + 1;\r
+ }\r
+ }\r
\r
ReadIntValueFromReg(hKey4, "LowUp", &FnameCnv);\r
ReadIntValueFromReg(hKey4, "Tout", &TimeOut);\r