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:
parent
9de216f1b4
commit
49e616b7e5
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user