Rename variables sequoia_windows
authorThomas
Fri, 30 Aug 2019 16:49:55 +0200
branchsequoia_windows
changeset 4035e87da0dd6136
parent 4018 1773c1ac046a
child 4036 9ecb9fbb5f6b
Rename variables
src/platform_windows.cpp
     1.1 --- a/src/platform_windows.cpp	Tue Aug 27 11:35:41 2019 +0200
     1.2 +++ b/src/platform_windows.cpp	Fri Aug 30 16:49:55 2019 +0200
     1.3 @@ -25,13 +25,17 @@
     1.4  #define WC_ERR_INVALID_CHARS      0x00000080  // error for invalid chars
     1.5  #endif
     1.6  
     1.7 -#define SYSTEM_FOLDER_DEFAULT "%ALLUSERSPROFILE%\\pEp"
     1.8 -#define USER_FOLDER_DEFAULT "%LOCALAPPDATA%\\pEp"
     1.9 +#define PER_MACHINE_DIRECTORY "%ALLUSERSPROFILE%\\pEp"
    1.10 +#define PER_USER_DIRECTORY "%LOCALAPPDATA%\\pEp"
    1.11  #define KEYS_DB "keys.db"
    1.12  #define MANAGEMENT_DB "management.db"
    1.13  #define SYSTEM_DB "system.db"
    1.14 -#define USER_FOLDER_PATH pEpUserFolderPath().c_str()
    1.15 +#ifndef USER_FOLDER_PATH
    1.16 +#define USER_FOLDER_PATH pEpUserFolderPath().c_str()
    1.17 +#endif
    1.18 +#ifndef SYSTEM_FOLDER_PATH
    1.19  #define SYSTEM_FOLDER_PATH pEpSystemFolderPath().c_str()
    1.20 +#endif
    1.21  
    1.22  using namespace std;
    1.23  
    1.24 @@ -143,7 +147,7 @@
    1.25  static inline string pEpSystemFolderPath(void)
    1.26  {
    1.27  	static TCHAR tPath[PATH_BUF_SIZE];
    1.28 -	string path = SYSTEM_FOLDER_DEFAULT;
    1.29 +	string path = PER_MACHINE_DIRECTORY;
    1.30  
    1.31  	// Get SystemFolder Registry value and use if available
    1.32  	bool result = readRegistryString(HKEY_CURRENT_USER,
    1.33 @@ -159,7 +163,7 @@
    1.34  static inline string pEpUserFolderPath(void)
    1.35  {
    1.36  	static TCHAR tPath[PATH_BUF_SIZE];
    1.37 -	string path = USER_FOLDER_DEFAULT;
    1.38 +	string path = PER_USER_DIRECTORY;
    1.39  
    1.40  	// Get UserFolder Registry value and use if available
    1.41  	bool result = readRegistryString(HKEY_CURRENT_USER,