1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 10:33:30 +08:00

Also check for directory presence before migrating

This commit is contained in:
Dean Herbert 2020-05-13 20:19:14 +09:00
parent 9de216f1b4
commit 49e616b7e5

View File

@ -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);