Fix drag drop of osu! folder not working as expected

This commit is contained in:
Dean Herbert 2022-05-17 17:51:28 +09:00
parent 83e781d5a1
commit f4e0ad8c4c

View File

@ -211,14 +211,14 @@ namespace osu.Game.Overlays.FirstRunSetup
private void onDirectorySelected(ValueChangedEvent<DirectoryInfo> directory)
{
if (directory.NewValue == null || directory.OldValue == null)
if (directory.NewValue == null)
{
Current.Value = string.Empty;
return;
}
// DirectorySelectors can trigger a noop value changed, but `DirectoryInfo` equality doesn't catch this.
if (directory.OldValue.FullName == directory.NewValue.FullName)
if (directory.OldValue?.FullName == directory.NewValue.FullName)
return;
if (directory.NewValue?.GetFiles(@"osu!.*.cfg").Any() ?? false)