Skip to content
This repository has been archived by the owner on Mar 11, 2024. It is now read-only.

Commit

Permalink
issue#10: Fixed a startup error caused by missing downloads folder. N…
Browse files Browse the repository at this point in the history
…ow always recreates needed folders before launching teams. (#11)

Co-authored-by: Kibsgaard <[email protected]>
  • Loading branch information
Kibsgaard and Kibsgaard authored May 10, 2021
1 parent cc13012 commit d2a8b8b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/MMT.Core/ProfileManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ public void Save(string profileName)

Directory.CreateDirectory(Path.Combine(_customProfilesPath, profileName));
Directory.CreateDirectory(Path.Combine(_customProfilesPath, profileName, "Desktop"));
Directory.CreateDirectory(Path.Combine(_customProfilesPath, profileName, "Downloads"));
}

public void Delete(string profileName)
Expand Down
3 changes: 3 additions & 0 deletions src/MMT.Core/TeamsLauncher.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ public void Start(string profileName)

string oldUserProfile = StaticResources.UserProfile;
string userProfile = Path.Combine(StaticResources.LocalAppData, StaticResources.CustomProfiles, profileName);
Directory.CreateDirectory(userProfile);
Directory.CreateDirectory(Path.Combine(userProfile, "Desktop"));
Directory.CreateDirectory(Path.Combine(userProfile, "Downloads"));
Environment.SetEnvironmentVariable("USERPROFILE", userProfile);
string updateExePath = Path.Combine(oldUserProfile, StaticResources.UpdateExe);

Expand Down

0 comments on commit d2a8b8b

Please sign in to comment.