1
0
mirror of https://github.com/veracrypt/VeraCrypt.git synced 2025-11-11 11:08:02 -06:00

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

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