mirror of
https://github.com/ppy/osu.git
synced 2025-01-13 13:32:54 +08:00
Fix for the issue
This commit is contained in:
parent
a14481acca
commit
54d5d4e7c6
@ -47,6 +47,7 @@ namespace osu.Game.Overlays.Settings.Sections.Maintenance
|
|||||||
var directoryInfos = target.GetDirectories();
|
var directoryInfos = target.GetDirectories();
|
||||||
var fileInfos = target.GetFiles();
|
var fileInfos = target.GetFiles();
|
||||||
|
|
||||||
|
//With an empty disk (mb flash drive), this if could be false
|
||||||
if (directoryInfos.Length > 0 || fileInfos.Length > 0)
|
if (directoryInfos.Length > 0 || fileInfos.Length > 0)
|
||||||
{
|
{
|
||||||
// Quick test for whether there's already an osu! install at the target path.
|
// Quick test for whether there's already an osu! install at the target path.
|
||||||
@ -65,7 +66,11 @@ namespace osu.Game.Overlays.Settings.Sections.Maintenance
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
target = target.CreateSubdirectory("osu-lazer");
|
//Check for a root directory
|
||||||
|
if (target.Parent == null)
|
||||||
|
target = Directory.CreateDirectory(Path.Combine(target.FullName, "osu-lazer"));
|
||||||
|
else
|
||||||
|
target = target.CreateSubdirectory("osu-lazer");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
|
Loading…
Reference in New Issue
Block a user