mirror of
https://github.com/ppy/osu.git
synced 2026-05-26 06:49:54 +08:00
Also check for directory presence before migrating
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user