From 2ddc37416416894bf085edc6ca4a0b3862fae2c2 Mon Sep 17 00:00:00 2001 From: Mounir IDRASSI Date: Mon, 17 Oct 2016 16:26:34 +0200 Subject: Windows: Remove VeraCrypt from EFI boot partition after decrypting the system --- src/Setup/Setup.c | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) (limited to 'src/Setup') diff --git a/src/Setup/Setup.c b/src/Setup/Setup.c index 331b8ea4..6f35e282 100644 --- a/src/Setup/Setup.c +++ b/src/Setup/Setup.c @@ -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; -- cgit v1.2.3