Windows: check "TrueCrypt Mode" in password dialog when mounting a file container with .tc extension
This commit is contained in:
parent
2a93826497
commit
1fd097c666
|
@ -7392,6 +7392,15 @@ BOOL CheckFileExtension (wchar_t *fileName)
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
BOOL IsTrueCryptFileExtension (wchar_t *fileName)
|
||||
{
|
||||
wchar_t *ext = wcsrchr (fileName, L'.');
|
||||
if (ext && !_wcsicmp (ext, L".tc"))
|
||||
return TRUE;
|
||||
else
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
void CorrectFileName (wchar_t* fileName)
|
||||
{
|
||||
/* replace '/' by '\' */
|
||||
|
|
|
@ -351,6 +351,7 @@ BOOL CloseVolumeExplorerWindows (HWND hwnd, int driveNo);
|
|||
BOOL UpdateDriveCustomLabel (int driveNo, wchar_t* effectiveLabel, BOOL bSetValue);
|
||||
BOOL CheckCapsLock (HWND hwnd, BOOL quiet);
|
||||
BOOL CheckFileExtension (wchar_t *fileName);
|
||||
BOOL IsTrueCryptFileExtension (wchar_t *fileName);
|
||||
void CorrectFileName (wchar_t* fileName);
|
||||
void CorrectURL (wchar_t* fileName);
|
||||
void IncreaseWrongPwdRetryCount (int count);
|
||||
|
|
|
@ -5061,7 +5061,7 @@ static BOOL Mount (HWND hwndDlg, int nDosDriveNo, wchar_t *szFileName, int pim,
|
|||
else if (!Silent)
|
||||
{
|
||||
int GuiPkcs5 = EffectiveVolumePkcs5;
|
||||
BOOL GuiTrueCryptMode = EffectiveVolumeTrueCryptMode;
|
||||
BOOL GuiTrueCryptMode = EffectiveVolumeTrueCryptMode || IsTrueCryptFileExtension (szFileName)? TRUE : FALSE;
|
||||
int GuiPim = EffectiveVolumePim;
|
||||
StringCbCopyW (PasswordDlgVolume, sizeof(PasswordDlgVolume), szFileName);
|
||||
|
||||
|
|
Loading…
Reference in New Issue