fixed bug where only having one profile would result in no profiles

This commit is contained in:
Timothy Baldridge 2019-09-06 22:57:49 -06:00
parent 30cd2d4b69
commit dd157d9e28

View File

@ -152,11 +152,12 @@ namespace Wabbajack
{
Info($"Looking for other profiles");
var other_profiles_path = Path.Combine(MO2ProfileDir, "otherprofiles.txt");
SelectedProfiles = new HashSet<string>();
if (File.Exists(other_profiles_path))
{
SelectedProfiles = File.ReadAllLines(other_profiles_path).ToHashSet();
SelectedProfiles.Add(MO2Profile);
}
SelectedProfiles.Add(MO2Profile);
Info($"Using Profiles: " + string.Join(", ", SelectedProfiles.OrderBy(p => p)));