From 49e616b7e561ab940a2fa10f294af179f2b39e91 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Wed, 13 May 2020 20:19:14 +0900 Subject: [PATCH] Also check for directory presence before migrating --- osu.Game/IO/OsuStorage.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/osu.Game/IO/OsuStorage.cs b/osu.Game/IO/OsuStorage.cs index 6dc25e871c..b060add03b 100644 --- a/osu.Game/IO/OsuStorage.cs +++ b/osu.Game/IO/OsuStorage.cs @@ -51,7 +51,7 @@ namespace osu.Game.IO // ensure the new location has no files present, else hard abort if (destination.Exists) { - if (destination.GetFiles().Length > 0) + if (destination.GetFiles().Length > 0 || destination.GetDirectories().Length > 0) throw new InvalidOperationException("Migration destination already has files present"); deleteRecursive(destination);