mirror of https://github.com/ppy/osu
Add comments around cwd handling
This commit is contained in:
parent
c00a558cb7
commit
66d104394f
|
@ -27,13 +27,15 @@ 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)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue