Skip to content

Commit

Permalink
Migrate old profile if no profile are found
Browse files Browse the repository at this point in the history
  • Loading branch information
Sora-yx committed Dec 16, 2024
1 parent f21e207 commit 81d4537
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion SA-Mod-Manager/Profile/ProfileManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ public static bool MigrateProfile(string path)
/// </summary>
public static void MigrateProfiles(bool deletesource = false)
{
if (string.IsNullOrEmpty(App.CurrentGame.gameDirectory) == false)
if (Util.IsStringValid(App.CurrentGame.gameDirectory))
{
string modPath = Path.Combine(App.CurrentGame.gameDirectory, "mods");
Util.CreateSafeDirectory(modPath);
Expand Down
1 change: 1 addition & 0 deletions SA-Mod-Manager/Profile/Profiles.cs
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@ public bool ValidateProfiles()

if (list.Count == 1 && count == 1) //no profile at all
{
ProfileManager.MigrateProfiles(false);
return false;
}

Expand Down

0 comments on commit 81d4537

Please sign in to comment.