diff options
author | Mounir IDRASSI <mounir.idrassi@idrix.fr> | 2024-11-15 15:47:28 +0100 |
---|---|---|
committer | Mounir IDRASSI <mounir.idrassi@idrix.fr> | 2024-11-15 15:47:28 +0100 |
commit | ad39040fdce19bc99def199d1ac654fbc78892bf (patch) | |
tree | 8d66f98eece1da81b7b8388baefaad5a90839502 /src/Common | |
parent | 214fbb5cbde3dd600aa8bfe738011d428c4a4fda (diff) | |
download | VeraCrypt-ad39040fdce19bc99def199d1ac654fbc78892bf.tar.gz VeraCrypt-ad39040fdce19bc99def199d1ac654fbc78892bf.zip |
Windows: Fix warning when building Setup and Portable. No file elevation is used for them.
Diffstat (limited to 'src/Common')
-rw-r--r-- | src/Common/BootEncryption.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/Common/BootEncryption.cpp b/src/Common/BootEncryption.cpp index b377ad7d..ae881039 100644 --- a/src/Common/BootEncryption.cpp +++ b/src/Common/BootEncryption.cpp @@ -773,11 +773,13 @@ namespace VeraCrypt else { LastError = GetLastError(); +#ifndef SETUP if (LastError == ERROR_ACCESS_DENIED && IsUacSupported()) { Elevated = true; FileOpen = true; } +#endif } FilePointerPosition = 0; @@ -806,12 +808,14 @@ namespace VeraCrypt throw SystemException (SRC_POS); } +#ifndef SETUP if (Elevated) { Elevator::ReadWriteFile (false, IsDevice, Path, buffer, FilePointerPosition, size, &bytesRead); FilePointerPosition += bytesRead; return bytesRead; } +#endif if (!ReadFile (Handle, buffer, size, &bytesRead, NULL)) { @@ -913,6 +917,7 @@ namespace VeraCrypt try { +#ifndef SETUP if (Elevated) { Elevator::ReadWriteFile (true, IsDevice, Path, buffer, FilePointerPosition, size, &bytesWritten); @@ -920,6 +925,7 @@ namespace VeraCrypt throw_sys_if (bytesWritten != size); } else +#endif { if (!WriteFile (Handle, buffer, size, &bytesWritten, NULL)) { @@ -1046,11 +1052,13 @@ namespace VeraCrypt else { LastError = GetLastError (); +#ifndef SETUP if (LastError == ERROR_ACCESS_DENIED && IsUacSupported()) { Elevated = true; FileOpen = true; } +#endif } FilePointerPosition = 0; |