FFFTPのソースコードです。
修订版 | 541deac70191d2398920f2ba87b1ed629d91b121 (tree) |
---|---|
时间 | 2012-04-25 20:33:57 |
作者 | s_kawamoto <s_kawamoto@user...> |
Commiter | s_kawamoto |
Add extensions of files that will be transferred in ASCII mode.
Fix bugs of converting old type extensions lists.
@@ -176,7 +176,9 @@ int TransMode = TYPE_X; | ||
176 | 176 | int ConnectOnStart = YES; |
177 | 177 | int DebugConsole = NO; |
178 | 178 | int SaveWinPos = NO; |
179 | -char AsciiExt[ASCII_EXT_LEN+1] = { "*.txt\0*.html\0*.htm\0*.cgi\0*.pl\0" }; | |
179 | +// アスキーモード判別の改良 | |
180 | +//char AsciiExt[ASCII_EXT_LEN+1] = { "*.txt\0*.html\0*.htm\0*.cgi\0*.pl\0" }; | |
181 | +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" }; | |
180 | 182 | int RecvMode = TRANS_DLG; |
181 | 183 | int SendMode = TRANS_DLG; |
182 | 184 | int MoveMode = MOVE_DLG; |
@@ -748,8 +748,12 @@ int LoadRegistry(void) | ||
748 | 748 | if(ReadMultiStringFromReg(hKey4, "AsciiFile", AsciiExt, ASCII_EXT_LEN+1) == FFFTP_FAIL) |
749 | 749 | { |
750 | 750 | /* 旧ASCIIモードの拡張子の設定を新しいものに変換 */ |
751 | - ReadStringFromReg(hKey4, "Ascii", Str, ASCII_EXT_LEN+1); | |
752 | - memset(AsciiExt, NUL, ASCII_EXT_LEN+1); | |
751 | + // アスキーモード判別の改良 | |
752 | +// ReadStringFromReg(hKey4, "Ascii", Str, ASCII_EXT_LEN+1); | |
753 | +// memset(AsciiExt, NUL, ASCII_EXT_LEN+1); | |
754 | + Str[0] = NUL; | |
755 | + if(ReadStringFromReg(hKey4, "Ascii", Str, ASCII_EXT_LEN+1) == FFFTP_SUCCESS) | |
756 | + memset(AsciiExt, NUL, ASCII_EXT_LEN+1); | |
753 | 757 | Pos = Str; |
754 | 758 | while(*Pos != NUL) |
755 | 759 | { |