1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-26 20:23:00 +08:00

Delete migration source if no files exist after completion

This commit is contained in:
Dean Herbert 2020-05-13 23:02:28 +09:00
parent 0b73063a89
commit 06f507496a

View File

@ -87,6 +87,9 @@ namespace osu.Game.IO
dir.Delete(true);
}
if (target.GetFiles().Length == 0 && target.GetDirectories().Length == 0)
target.Delete();
}
private static void copyRecursive(DirectoryInfo source, DirectoryInfo destination, bool topLevelExcludes = true)