X-Git-Url: http://git.sourceforge.jp/view?p=ffftp%2Fffftp.git;a=blobdiff_plain;f=registry.c;h=f51900a78058e9f316be0aa24b5b5233981acf67;hp=825501fa846edb9b9b11cc97cd71c8d892674026;hb=39667277c869f8eea15387ba7f30e97710721195;hpb=6aa7febbc4c45b9c466c98b912cca6eec34df204 diff --git a/registry.c b/registry.c index 825501f..f51900a 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)); @@ -608,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); } @@ -977,6 +984,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); } @@ -2490,9 +2499,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;