VeraCrypt
aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMounir IDRASSI <mounir.idrassi@idrix.fr>2018-04-19 11:04:03 +0200
committerMounir IDRASSI <mounir.idrassi@idrix.fr>2018-04-23 16:59:34 +0200
commit8e4497de2a68600daabcfbd75524d04d2edae17c (patch)
treefba7cb912c7ce8163a2e2b3b43a6ba0b6c50ff89
parent75705ddde7bf600c668c2e0594d89b89d5735680 (diff)
downloadVeraCrypt-8e4497de2a68600daabcfbd75524d04d2edae17c.tar.gz
VeraCrypt-8e4497de2a68600daabcfbd75524d04d2edae17c.zip
Windows: remove ending backslash from installation path written to SetupConfig.ini
-rw-r--r--src/Common/BootEncryption.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/Common/BootEncryption.cpp b/src/Common/BootEncryption.cpp
index b57f5c28..e64347d7 100644
--- a/src/Common/BootEncryption.cpp
+++ b/src/Common/BootEncryption.cpp
@@ -2707,7 +2707,14 @@ namespace VeraCrypt
wchar_t szSetupconfigLocation [TC_MAX_PATH + 20];
if (bForInstall)
+ {
GetInstallationPath (NULL, szInstallPath, ARRAYSIZE (szInstallPath), NULL);
+ // remove ending backslash
+ if (szInstallPath [wcslen (szInstallPath) - 1] == L'\\')
+ {
+ szInstallPath [wcslen (szInstallPath) - 1] = 0;
+ }
+ }
if (GetSetupconfigLocation (szSetupconfigLocation, ARRAYSIZE (szSetupconfigLocation)))
{
::CreateDirectoryW (szSetupconfigLocation, NULL);