mirror of
https://github.com/osukey/osukey.git
synced 2025-08-04 07:06:35 +09:00
Add comments around cwd handling
This commit is contained in:
@ -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)
|
||||
{
|
||||
|
Reference in New Issue
Block a user