1
0
mirror of https://github.com/veracrypt/VeraCrypt.git synced 2025-11-11 11:08:02 -06: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:
Mounir IDRASSI
2020-07-02 02:17:58 +02:00
parent 28c51228f8
commit 002a9a29a7

View File

@@ -779,15 +779,14 @@ error:
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)