Windows: remove ending backslash from installation path written to SetupConfig.ini

This commit is contained in:
Mounir IDRASSI 2018-04-19 11:04:03 +02:00
parent 75705ddde7
commit 8e4497de2a
No known key found for this signature in database
GPG Key ID: DD0C382D5FCFB8FC
1 changed files with 7 additions and 0 deletions

View File

@ -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);