As usual while waiting for the next release - don't forget to check the nightly builds in the forum.
... which I think is as simple as the following one liner:CodeIndex: src/sdk/configmanager.cpp===================================================================--- src/sdk/configmanager.cpp (revision 9594)+++ src/sdk/configmanager.cpp (working copy)@@ -68,10 +71,10 @@ inline wxString GetPortableConfigDir() { TCHAR buffer[MAX_PATH];- if (::GetEnvironmentVariable(_T("APPDATA"), buffer, MAX_PATH))+ if (!ConfigManager::has_alternate_user_data_path && ::GetEnvironmentVariable(_T("APPDATA"), buffer, MAX_PATH)) return wxString::Format(_T("%s\\CodeBlocks"), buffer); else
Index: src/sdk/configmanager.cpp===================================================================--- src/sdk/configmanager.cpp (revision 9594)+++ src/sdk/configmanager.cpp (working copy)@@ -68,10 +71,10 @@ inline wxString GetPortableConfigDir() { TCHAR buffer[MAX_PATH];- if (::GetEnvironmentVariable(_T("APPDATA"), buffer, MAX_PATH))+ if (!ConfigManager::has_alternate_user_data_path && ::GetEnvironmentVariable(_T("APPDATA"), buffer, MAX_PATH)) return wxString::Format(_T("%s\\CodeBlocks"), buffer); else
inline wxString ConfigManager::GetUserDataFolder(){ if (has_alternate_user_data_path) return alternate_user_data_path;#ifdef __WXMSW__ TCHAR buffer[MAX_PATH]; if (::GetEnvironmentVariable(_T("APPDATA"), buffer, MAX_PATH)) return wxString::Format(_T("%s\\CodeBlocks"), buffer);#endif return wxStandardPathsBase::Get().GetUserDataDir();}
I also forgot to override the check for default.conf in the executable directory (I think it makes sense to obey the switch if it is specified). See the second change in this part of the patch.
One last thing: what if the user specifies a relative path?