Add comments around cwd handling

This commit is contained in:
Drew DeVault 2017-01-30 09:35:59 -05:00
parent c00a558cb7
commit 66d104394f
1 changed files with 4 additions and 2 deletions

View File

@ -26,14 +26,16 @@ public static class Program
public static int Main(string[] args)
{
LegacyFilesystemReader.Register();
var cwd = Directory.GetCurrentDirectory();
// Back up the cwd before DesktopGameHost changes it
var cwd = Environment.CurrentDirectory;
using (DesktopGameHost host = Host.GetSuitableHost(@"osu", true))
{
if (!host.IsPrimaryInstance)
{
var importer = new BeatmapImporter(host);
// Restore the cwd so relative paths given at the command line work correctly
Directory.SetCurrentDirectory(cwd);
foreach (var file in args)
{