VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Common/Format.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/Common/Format.c')
-rw-r--r--src/Common/Format.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/Common/Format.c b/src/Common/Format.c
index 37fa38da..3ebfef1e 100644
--- a/src/Common/Format.c
+++ b/src/Common/Format.c
@@ -640,9 +640,9 @@ error:
retCode = FormatNtfs (driveNo, volParams->clusterSize);
if (retCode != TRUE)
{
- if (!UnmountVolume (volParams->hwndDlg, driveNo, FALSE))
+ if (!UnmountVolumeAfterFormatExCall (volParams->hwndDlg, driveNo))
MessageBoxW (volParams->hwndDlg, GetString ("CANT_DISMOUNT_VOLUME"), lpszTitle, ICON_HAND);
if (dataAreaSize <= TC_MAX_FAT_SECTOR_COUNT * FormatSectorSize)
{
@@ -662,9 +662,9 @@ error:
nStatus = ERR_DONT_REPORT;
goto fv_end;
}
- if (!UnmountVolume (volParams->hwndDlg, driveNo, FALSE))
+ if (!UnmountVolumeAfterFormatExCall (volParams->hwndDlg, driveNo))
MessageBoxW (volParams->hwndDlg, GetString ("CANT_DISMOUNT_VOLUME"), lpszTitle, ICON_HAND);
}
fv_end:
@@ -835,9 +835,9 @@ BOOL FormatNtfs (int driveNo, int clusterSize)
FormatEx (dir, FMIFS_HARDDISK, L"NTFS", L"", TRUE, clusterSize * FormatSectorSize, FormatExCallback);
}
// The device may be referenced for some time after FormatEx() returns
- Sleep (2000);
+ Sleep (4000);
FreeLibrary (hModule);
return FormatExResult;
}