Fix ignored excluding more than top level

This commit is contained in:
Dean Herbert
2020-05-12 12:39:04 +09:00
parent 984f27c107
commit e4a23b3e7d
2 changed files with 14 additions and 4 deletions

View File

@ -71,7 +71,7 @@ namespace osu.Game.IO
{
foreach (System.IO.FileInfo fi in target.GetFiles())
{
if (IGNORE_FILES.Contains(fi.Name))
if (topLevelExcludes && IGNORE_FILES.Contains(fi.Name))
continue;
fi.Delete();
@ -79,7 +79,7 @@ namespace osu.Game.IO
foreach (DirectoryInfo dir in target.GetDirectories())
{
if (IGNORE_DIRECTORIES.Contains(dir.Name))
if (topLevelExcludes && IGNORE_DIRECTORIES.Contains(dir.Name))
continue;
dir.Delete(true);
@ -93,7 +93,7 @@ namespace osu.Game.IO
foreach (System.IO.FileInfo fi in source.GetFiles())
{
if (IGNORE_FILES.Contains(fi.Name))
if (topLevelExcludes && IGNORE_FILES.Contains(fi.Name))
continue;
int tries = 5;
@ -114,7 +114,7 @@ namespace osu.Game.IO
foreach (DirectoryInfo dir in source.GetDirectories())
{
if (IGNORE_DIRECTORIES.Contains(dir.Name))
if (topLevelExcludes && IGNORE_DIRECTORIES.Contains(dir.Name))
continue;
copyRecursive(dir, destination.CreateSubdirectory(dir.Name), false);