Skip to content
This repository
Browse code

Update special://profile before attempting to load the profile's guis…

…ettings.xml file.
  • Loading branch information...
commit 12bdefb5c7bd009bb80172e478ad4d573af038da 1 parent 1fb487a
leechguy authored May 10, 2013

Showing 1 changed file with 6 additions and 3 deletions. Show diff stats Hide diff stats

  1. 9  xbmc/profiles/ProfilesManager.cpp
9  xbmc/profiles/ProfilesManager.cpp
@@ -241,11 +241,14 @@ bool CProfilesManager::LoadProfile(size_t index)
241 241
   if (m_currentProfile == index)
242 242
     return true;
243 243
 
  244
+  // unload any old settings
  245
+  CSettings::Get().Unload();
  246
+
244 247
   m_currentProfile = index;
  248
+  // point special://profile to the correct profile path
  249
+  CSpecialProtocol::SetProfilePath(GetProfileUserDataFolder());
245 250
 
246  
-  // first unload any old settings
247  
-  CSettings::Get().Unload();
248  
-  // then load the new settings
  251
+  // load the new settings
249 252
   if (!CSettings::Get().Load())
250 253
   {
251 254
     CLog::Log(LOGFATAL, "CProfilesManager: unable to load settings for profile \"%s\"", m_profiles.at(index).getName().c_str());

0 notes on commit 12bdefb

Please sign in to comment.
Something went wrong with that request. Please try again.