mirror of
https://github.com/claunia/SabreTools.git
synced 2025-12-16 19:14:27 +00:00
[DatFile] Use new blank folder code for standard as well
This commit is contained in:
@@ -92,12 +92,14 @@ namespace SabreTools.Helper.Dats
|
||||
// Now find all folders that are empty, if we are supposed to
|
||||
if (!Romba && addBlanks)
|
||||
{
|
||||
List<string> empties = Directory.EnumerateDirectories(basePath, "*", SearchOption.AllDirectories).ToList();
|
||||
List<string> empties = Directory
|
||||
.EnumerateDirectories(basePath, "*", SearchOption.AllDirectories)
|
||||
.Where(dir => Directory.EnumerateFileSystemEntries(dir, "*", SearchOption.AllDirectories).Count() == 0)
|
||||
.ToList();
|
||||
|
||||
Parallel.ForEach(empties,
|
||||
new ParallelOptions { MaxDegreeOfParallelism = Globals.MaxDegreeOfParallelism },
|
||||
dir =>
|
||||
{
|
||||
if (Directory.EnumerateFiles(dir, "*", SearchOption.TopDirectoryOnly).Count() == 0)
|
||||
{
|
||||
// Get the full path for the directory
|
||||
string fulldir = Path.GetFullPath(dir);
|
||||
@@ -139,8 +141,7 @@ namespace SabreTools.Helper.Dats
|
||||
}
|
||||
|
||||
Globals.Logger.Verbose("Adding blank empty folder: " + gamename);
|
||||
this["null"].Add(new Rom(romname, gamename));
|
||||
}
|
||||
this["null"].Add(new Rom(romname, gamename, omitFromScan));
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user