mirror of
https://github.com/ppy/osu.git
synced 2025-01-21 08:12:56 +08:00
Fix drag drop of osu! folder not working as expected
This commit is contained in:
parent
83e781d5a1
commit
f4e0ad8c4c
@ -211,14 +211,14 @@ namespace osu.Game.Overlays.FirstRunSetup
|
|||||||
|
|
||||||
private void onDirectorySelected(ValueChangedEvent<DirectoryInfo> directory)
|
private void onDirectorySelected(ValueChangedEvent<DirectoryInfo> directory)
|
||||||
{
|
{
|
||||||
if (directory.NewValue == null || directory.OldValue == null)
|
if (directory.NewValue == null)
|
||||||
{
|
{
|
||||||
Current.Value = string.Empty;
|
Current.Value = string.Empty;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// DirectorySelectors can trigger a noop value changed, but `DirectoryInfo` equality doesn't catch this.
|
// 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;
|
return;
|
||||||
|
|
||||||
if (directory.NewValue?.GetFiles(@"osu!.*.cfg").Any() ?? false)
|
if (directory.NewValue?.GetFiles(@"osu!.*.cfg").Any() ?? false)
|
||||||
|
Loading…
Reference in New Issue
Block a user