mirror of
https://github.com/veracrypt/VeraCrypt
synced 2024-11-10 13:13:34 +01:00
Windows: Use native Windows format program first to perform formatting since it is more reliable and only fallback to FormatEx function from fmifs.dll in case of issue.
This commit is contained in:
parent
28c51228f8
commit
002a9a29a7
@ -778,16 +778,15 @@ int TCFormatVolume (volatile FORMAT_VOL_PARAMETERS *volParams)
|
||||
nStatus = ERR_VOL_MOUNT_FAILED;
|
||||
goto fv_end;
|
||||
}
|
||||
|
||||
if (!Silent && !IsAdmin () && IsUacSupported ())
|
||||
retCode = UacFormatFs (volParams->hwndDlg, driveNo, volParams->clusterSize, fsType);
|
||||
else
|
||||
retCode = FormatFs (driveNo, volParams->clusterSize, fsType);
|
||||
|
||||
retCode = ExternalFormatFs (driveNo, volParams->clusterSize, fsType);
|
||||
if (retCode != TRUE)
|
||||
{
|
||||
/* fallback to calling Windows native formatting tool */
|
||||
retCode = ExternalFormatFs (driveNo, volParams->clusterSize, fsType);
|
||||
/* fallback to using FormatEx function from fmifs.dll */
|
||||
if (!Silent && !IsAdmin () && IsUacSupported ())
|
||||
retCode = UacFormatFs (volParams->hwndDlg, driveNo, volParams->clusterSize, fsType);
|
||||
else
|
||||
retCode = FormatFs (driveNo, volParams->clusterSize, fsType);
|
||||
}
|
||||
|
||||
if (retCode != TRUE)
|
||||
|
Loading…
Reference in New Issue
Block a user