From 8e4497de2a68600daabcfbd75524d04d2edae17c Mon Sep 17 00:00:00 2001 From: Mounir IDRASSI Date: Thu, 19 Apr 2018 11:04:03 +0200 Subject: Windows: remove ending backslash from installation path written to SetupConfig.ini --- src/Common/BootEncryption.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src') 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); -- cgit v1.2.3