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:
@@ -778,16 +778,15 @@ error:
|
|||||||
nStatus = ERR_VOL_MOUNT_FAILED;
|
nStatus = ERR_VOL_MOUNT_FAILED;
|
||||||
goto fv_end;
|
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)
|
if (retCode != TRUE)
|
||||||
{
|
{
|
||||||
/* fallback to calling Windows native formatting tool */
|
/* fallback to using FormatEx function from fmifs.dll */
|
||||||
retCode = ExternalFormatFs (driveNo, volParams->clusterSize, fsType);
|
if (!Silent && !IsAdmin () && IsUacSupported ())
|
||||||
|
retCode = UacFormatFs (volParams->hwndDlg, driveNo, volParams->clusterSize, fsType);
|
||||||
|
else
|
||||||
|
retCode = FormatFs (driveNo, volParams->clusterSize, fsType);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (retCode != TRUE)
|
if (retCode != TRUE)
|
||||||
|
|||||||
Reference in New Issue
Block a user