mirror of
https://github.com/ppy/osu
synced 2024-12-25 16:22:23 +00:00
Add comments around cwd handling
This commit is contained in:
parent
c00a558cb7
commit
66d104394f
@ -26,14 +26,16 @@ namespace osu.Desktop
|
||||
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
Block a user