diff options
author | Mounir IDRASSI <mounir.idrassi@idrix.fr> | 2018-09-02 23:21:51 +0200 |
---|---|---|
committer | Mounir IDRASSI <mounir.idrassi@idrix.fr> | 2018-09-03 01:00:54 +0200 |
commit | d3060a97b68636ee3143ec1c02bbaaf3f3549131 (patch) | |
tree | f89ecb2e86e804a9e8bde5ec8ecbc56077adedda | |
parent | 35dabf4b2cfc6562608e7052d632dc666d66f01d (diff) | |
download | VeraCrypt-d3060a97b68636ee3143ec1c02bbaaf3f3549131.tar.gz VeraCrypt-d3060a97b68636ee3143ec1c02bbaaf3f3549131.zip |
Windows: fix regression when language selected in the setup during fresh install and that caused VeraCrypt background task to be disabled.
-rw-r--r-- | src/Common/Dlgcode.c | 15 | ||||
-rw-r--r-- | src/Common/Dlgcode.h | 3 | ||||
-rw-r--r-- | src/Format/Tcformat.c | 5 | ||||
-rw-r--r-- | src/Mount/Mount.c | 6 |
4 files changed, 21 insertions, 8 deletions
diff --git a/src/Common/Dlgcode.c b/src/Common/Dlgcode.c index 6157b189..f9b6f327 100644 --- a/src/Common/Dlgcode.c +++ b/src/Common/Dlgcode.c | |||
@@ -151,6 +151,10 @@ BOOL bMountFavoritesOnLogon = FALSE; | |||
151 | 151 | ||
152 | BOOL bHistory = FALSE; | 152 | BOOL bHistory = FALSE; |
153 | 153 | ||
154 | #ifndef SETUP | ||
155 | BOOL bLanguageSetInSetup = FALSE; | ||
156 | #endif | ||
157 | |||
154 | // Status of detection of hidden sectors (whole-system-drive encryption). | 158 | // Status of detection of hidden sectors (whole-system-drive encryption). |
155 | // 0 - Unknown/undetermined/completed, 1: Detection is or was in progress (but did not complete e.g. due to system crash). | 159 | // 0 - Unknown/undetermined/completed, 1: Detection is or was in progress (but did not complete e.g. due to system crash). |
156 | int HiddenSectorDetectionStatus = 0; | 160 | int HiddenSectorDetectionStatus = 0; |
@@ -2877,9 +2881,6 @@ void InitApp (HINSTANCE hInstance, wchar_t *lpszCommandLine) | |||
2877 | char langId[6]; | 2881 | char langId[6]; |
2878 | InitCommonControlsPtr InitCommonControlsFn = NULL; | 2882 | InitCommonControlsPtr InitCommonControlsFn = NULL; |
2879 | wchar_t modPath[MAX_PATH]; | 2883 | wchar_t modPath[MAX_PATH]; |
2880 | #ifndef SETUP | ||
2881 | BOOL bLanguageSetInSetup = FALSE; | ||
2882 | #endif | ||
2883 | 2884 | ||
2884 | GetModuleFileNameW (NULL, modPath, ARRAYSIZE (modPath)); | 2885 | GetModuleFileNameW (NULL, modPath, ARRAYSIZE (modPath)); |
2885 | 2886 | ||
@@ -3053,9 +3054,12 @@ void InitApp (HINSTANCE hInstance, wchar_t *lpszCommandLine) | |||
3053 | } | 3054 | } |
3054 | } | 3055 | } |
3055 | 3056 | ||
3057 | #ifndef VCEXPANDER | ||
3056 | // delete the registry key created by the installer (if any) | 3058 | // delete the registry key created by the installer (if any) |
3057 | DeleteRegistryKey (HKEY_CURRENT_USER, L"Software\\VeraCrypt"); | 3059 | DeleteRegistryKey (HKEY_CURRENT_USER, L"Software\\VeraCrypt"); |
3058 | #endif | 3060 | #endif |
3061 | |||
3062 | #endif | ||
3059 | 3063 | ||
3060 | if (langId[0] == 0) | 3064 | if (langId[0] == 0) |
3061 | { | 3065 | { |
@@ -3077,11 +3081,6 @@ void InitApp (HINSTANCE hInstance, wchar_t *lpszCommandLine) | |||
3077 | LoadLanguageFile (); | 3081 | LoadLanguageFile (); |
3078 | 3082 | ||
3079 | #ifndef SETUP | 3083 | #ifndef SETUP |
3080 | // Save language to XML configuration file if it has been selected in the setup | ||
3081 | // so that other VeraCrypt programs will pick it up | ||
3082 | if (bLanguageSetInSetup) | ||
3083 | SaveSettings (NULL); | ||
3084 | |||
3085 | // UAC elevation moniker cannot be used in portable mode. | 3084 | // UAC elevation moniker cannot be used in portable mode. |
3086 | // A new instance of the application must be created with elevated privileges. | 3085 | // A new instance of the application must be created with elevated privileges. |
3087 | if (IsNonInstallMode () && !IsAdmin () && IsUacSupported ()) | 3086 | if (IsNonInstallMode () && !IsAdmin () && IsUacSupported ()) |
diff --git a/src/Common/Dlgcode.h b/src/Common/Dlgcode.h index 974d2e05..00a49239 100644 --- a/src/Common/Dlgcode.h +++ b/src/Common/Dlgcode.h | |||
@@ -163,6 +163,9 @@ extern BOOL MountVolumesAsSystemFavorite; | |||
163 | extern BOOL FavoriteMountOnArrivalInProgress; | 163 | extern BOOL FavoriteMountOnArrivalInProgress; |
164 | extern BOOL MultipleMountOperationInProgress; | 164 | extern BOOL MultipleMountOperationInProgress; |
165 | 165 | ||
166 | #ifndef SETUP | ||
167 | extern BOOL bLanguageSetInSetup; | ||
168 | #endif | ||
166 | 169 | ||
167 | enum tc_app_msg_ids | 170 | enum tc_app_msg_ids |
168 | { | 171 | { |
diff --git a/src/Format/Tcformat.c b/src/Format/Tcformat.c index ccdd682c..46ad2083 100644 --- a/src/Format/Tcformat.c +++ b/src/Format/Tcformat.c | |||
@@ -6060,6 +6060,11 @@ BOOL CALLBACK MainDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa | |||
6060 | 6060 | ||
6061 | LoadSettings (hwndDlg); | 6061 | LoadSettings (hwndDlg); |
6062 | 6062 | ||
6063 | // Save language to XML configuration file if it has been selected in the setup | ||
6064 | // so that other VeraCrypt programs will pick it up | ||
6065 | if (bLanguageSetInSetup) | ||
6066 | SaveSettings (hwndDlg); | ||
6067 | |||
6063 | LoadDefaultKeyFilesParam (); | 6068 | LoadDefaultKeyFilesParam (); |
6064 | RestoreDefaultKeyFilesParam (); | 6069 | RestoreDefaultKeyFilesParam (); |
6065 | 6070 | ||
diff --git a/src/Mount/Mount.c b/src/Mount/Mount.c index 7b42bc4b..a1543b61 100644 --- a/src/Mount/Mount.c +++ b/src/Mount/Mount.c | |||
@@ -6794,6 +6794,12 @@ BOOL CALLBACK MainDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa | |||
6794 | // General preferences | 6794 | // General preferences |
6795 | LoadSettings (hwndDlg); | 6795 | LoadSettings (hwndDlg); |
6796 | 6796 | ||
6797 | // Save language to XML configuration file if it has been selected in the setup | ||
6798 | // so that other VeraCrypt programs will pick it up | ||
6799 | if (bLanguageSetInSetup) | ||
6800 | SaveSettings (hwndDlg); | ||
6801 | |||
6802 | |||
6797 | // Keyfiles | 6803 | // Keyfiles |
6798 | LoadDefaultKeyFilesParam (); | 6804 | LoadDefaultKeyFilesParam (); |
6799 | RestoreDefaultKeyFilesParam (); | 6805 | RestoreDefaultKeyFilesParam (); |