1
0
mirror of https://github.com/veracrypt/VeraCrypt.git synced 2025-11-11 19:08:26 -06:00

Windows: Remove VeraCrypt from EFI boot partition after decrypting the system

This commit is contained in:
Mounir IDRASSI
2016-10-17 16:26:34 +02:00
parent 78d9e5fc3b
commit 2ddc374164
5 changed files with 46 additions and 32 deletions

View File

@@ -128,23 +128,7 @@ BOOL StatRemoveDirectory (wchar_t *lpszDir)
if (_wstat64 (lpszDir, &st) == 0)
{
BOOL bStatus = RemoveDirectory (lpszDir);
if (!bStatus)
{
/* force removal of the non empty directory */
wchar_t szOpPath[TC_MAX_PATH + 1] = {0};
SHFILEOPSTRUCTW op;
StringCchCopyW(szOpPath, ARRAYSIZE(szOpPath)-1, lpszDir);
ZeroMemory(&op, sizeof(op));
op.wFunc = FO_DELETE;
op.pFrom = szOpPath;
op.fFlags = FOF_SILENT | FOF_NOCONFIRMATION | FOF_NOERRORUI | FOF_NOCONFIRMMKDIR;
if ((0 == SHFileOperation(&op)) && (!op.fAnyOperationsAborted))
bStatus = TRUE;
}
return bStatus;
return DeleteDirectory (lpszDir);
}
else
return TRUE;