X-Git-Url: http://git.sourceforge.jp/view?p=ffftp%2Fffftp.git;a=blobdiff_plain;f=registry.c;h=be28d9cc0e36f481f0125619013473fb5a0f3c8b;hp=8f41e399d5c37836932e7487b996620c49b647b7;hb=1c6203ce6ace264b85ef9b677f75ecad9fb7c862;hpb=54e22287e55f2b2a890a8fdda61bb128be5f787f diff --git a/registry.c b/registry.c index 8f41e39..be28d9c 100644 --- a/registry.c +++ b/registry.c @@ -193,6 +193,8 @@ extern int FolderAttrNum; // 暗号化通信対応 extern BYTE CertificateCacheHash[MAX_CERT_CACHE_HASH][20]; extern BYTE SSLRootCAFileHash[20]; +// ファイルアイコン表示対応 +extern int DispFileIcon; /*----- マスタパスワードの設定 ---------------------------------------------- * @@ -422,7 +424,10 @@ void SaveRegistory(void) WriteMultiStringToReg(hKey4, "DefAttr", DefAttrList); - GetTempPath(FMAX_PATH, Str); + // 環境依存の不具合対策 +// GetTempPath(FMAX_PATH, Str); + GetAppTempPath(Str); + SetYenTail(Str); SaveStr(hKey4, "Tmp", TmpPath, Str); WriteBinaryToReg(hKey4, "Hdlg", &HostDlgSize, sizeof(SIZE)); @@ -493,6 +498,9 @@ void SaveRegistory(void) SaveIntNum(hKey5, "NetType", Hist.NetType, DefaultHist.NetType); // 自動切断対策 SaveIntNum(hKey5, "Noop", Hist.NoopInterval, DefaultHist.NoopInterval); + // 再転送対応 + SaveIntNum(hKey5, "ErrMode", Hist.TransferErrorMode, DefaultHist.TransferErrorMode); + SaveIntNum(hKey5, "ErrNotify", Hist.TransferErrorNotify, DefaultHist.TransferErrorNotify); CloseSubKey(hKey5); n++; @@ -577,6 +585,9 @@ void SaveRegistory(void) SaveIntNum(hKey5, "NetType", Host.NetType, DefaultHost.NetType); // 自動切断対策 SaveIntNum(hKey5, "Noop", Host.NoopInterval, DefaultHost.NoopInterval); + // 再転送対応 + SaveIntNum(hKey5, "ErrMode", Host.TransferErrorMode, DefaultHost.TransferErrorMode); + SaveIntNum(hKey5, "ErrNotify", Host.TransferErrorNotify, DefaultHost.TransferErrorNotify); } CloseSubKey(hKey5); } @@ -602,6 +613,8 @@ void SaveRegistory(void) StrCatOut((char*)&SSLRootCAFileHash, sizeof(SSLRootCAFileHash), Buf); EncodePassword(Buf, Str); WriteStringToReg(hKey4, "RootCertHash", Str); + // ファイルアイコン表示対応 + WriteIntValueToReg(hKey4, "ListIcon", DispFileIcon); } CloseSubKey(hKey4); } @@ -857,6 +870,9 @@ int LoadRegistory(void) ReadIntValueFromReg(hKey5, "NetType", &Hist.NetType); // 自動切断対策 ReadIntValueFromReg(hKey5, "Noop", &Hist.NoopInterval); + // 再転送対応 + ReadIntValueFromReg(hKey5, "ErrMode", &Hist.TransferErrorMode); + ReadIntValueFromReg(hKey5, "ErrNotify", &Hist.TransferErrorNotify); CloseSubKey(hKey5); AddHistoryToHistory(&Hist); @@ -944,12 +960,21 @@ int LoadRegistory(void) // 同時接続対応 ReadIntValueFromReg(hKey5, "ThreadCount", &Host.MaxThreadCount); ReadIntValueFromReg(hKey5, "ReuseCmdSkt", &Host.ReuseCmdSkt); + // 1.98d以前で同時接続数が1より大きい場合はソケットの再利用なし + if(Version < 1985) + { + if(Host.MaxThreadCount > 1) + Host.ReuseCmdSkt = NO; + } // MLSD対応 ReadIntValueFromReg(hKey5, "MLSD", &Host.UseMLSD); // IPv6対応 ReadIntValueFromReg(hKey5, "NetType", &Host.NetType); // 自動切断対策 ReadIntValueFromReg(hKey5, "Noop", &Host.NoopInterval); + // 再転送対応 + ReadIntValueFromReg(hKey5, "ErrMode", &Host.TransferErrorMode); + ReadIntValueFromReg(hKey5, "ErrNotify", &Host.TransferErrorNotify); CloseSubKey(hKey5); @@ -965,6 +990,8 @@ int LoadRegistory(void) ReadStringFromReg(hKey4, "RootCertHash", Str, PRIVATE_KEY_LEN*4+1); DecodePassword(Str, Buf); StrReadIn(Buf, sizeof(SSLRootCAFileHash), (char*)&SSLRootCAFileHash); + // ファイルアイコン表示対応 + ReadIntValueFromReg(hKey4, "ListIcon", &DispFileIcon); CloseSubKey(hKey4); } @@ -2478,9 +2505,10 @@ static int ReadMultiStringFromReg(void *Handle, char *Name, char *Str, DWORD Siz switch(IniKanjiCode) { case KANJI_NOCNV: - TempSize = min1(Size-1, strlen(Pos)); + TempSize = min1(Size - 2, strlen(Pos)); TempSize = StrReadIn(Pos, TempSize, Str); *(Str + TempSize) = NUL; + *(Str + TempSize + 1) = NUL; Sts = FFFTP_SUCCESS; if(!CheckMultiStringM(Str)) break;