Call addProfile after a path has been set for a new profile
When saving the fallback profile to a new profile, we have to delay calling addProfile until after a path has been set for the new profile. This is because ProfileModel::populate calls ProfileManager::sortProfiles, and the latter skips profiles that have path == FALLBACK/ . This also seems to take care of duplicate entries in "Switch Profile" menu, with respect to the fallback profile after saving.
Showing with 16 additions and 17 deletions