Fix build

This commit is contained in:
Matt Nadareski
2020-07-27 00:26:11 -07:00
parent 7df10855fa
commit 3621807790
2 changed files with 19 additions and 19 deletions

View File

@@ -435,10 +435,10 @@ namespace SabreTools.Library.DatFiles
Dictionary<StatReportFormat, string> outputs = CreateOutStatsNames(outDir, statDatFormat, reportName); Dictionary<StatReportFormat, string> outputs = CreateOutStatsNames(outDir, statDatFormat, reportName);
// Make sure we have all files and then order them // Make sure we have all files and then order them
List<string> files = DirectoryExtensions.GetFilesOnly(inputs); List<ParentablePath> files = DirectoryExtensions.GetFilesOnly(inputs);
files = files files = files
.OrderBy(i => Path.GetDirectoryName(i)) .OrderBy(i => Path.GetDirectoryName(i.CurrentPath))
.ThenBy(i => Path.GetFileName(i)) .ThenBy(i => Path.GetFileName(i.CurrentPath))
.ToList(); .ToList();
// Get all of the writers that we need // Get all of the writers that we need
@@ -456,11 +456,11 @@ namespace SabreTools.Library.DatFiles
DatStats dirStats = new DatStats(); DatStats dirStats = new DatStats();
// Now process each of the input files // Now process each of the input files
foreach (string file in files) foreach (ParentablePath file in files)
{ {
// Get the directory for the current file // Get the directory for the current file
string thisdir = Path.GetDirectoryName(file); string thisdir = Path.GetDirectoryName(file.CurrentPath);
basepath = Path.GetDirectoryName(Path.GetDirectoryName(file)); basepath = Path.GetDirectoryName(Path.GetDirectoryName(file.CurrentPath));
// If we don't have the first file and the directory has changed, show the previous directory stats and reset // If we don't have the first file and the directory has changed, show the previous directory stats and reset
if (lastdir != null && thisdir != lastdir) if (lastdir != null && thisdir != lastdir)
@@ -485,7 +485,7 @@ namespace SabreTools.Library.DatFiles
Globals.Logger.Verbose($"Beginning stat collection for '{file}'", false); Globals.Logger.Verbose($"Beginning stat collection for '{file}'", false);
List<string> games = new List<string>(); List<string> games = new List<string>();
DatFile datdata = DatFile.CreateAndParse(file); DatFile datdata = DatFile.CreateAndParse(file.CurrentPath);
datdata.Items.BucketBy(BucketedBy.Game, DedupeType.None, norename: true); datdata.Items.BucketBy(BucketedBy.Game, DedupeType.None, norename: true);
// Output single DAT stats (if asked) // Output single DAT stats (if asked)

View File

@@ -2948,10 +2948,10 @@ The following systems have headers that this program can work with:
string outDir = GetString(features, OutputDirStringValue); string outDir = GetString(features, OutputDirStringValue);
// Get only files from the inputs // Get only files from the inputs
List<string> files = DirectoryExtensions.GetFilesOnly(Inputs); List<ParentablePath> files = DirectoryExtensions.GetFilesOnly(Inputs);
foreach (string file in files) foreach (ParentablePath file in files)
{ {
Skipper.DetectTransformStore(file, outDir, nostore); Skipper.DetectTransformStore(file.CurrentPath, outDir, nostore);
} }
} }
} }
@@ -3020,10 +3020,10 @@ The following systems have headers that this program can work with:
string outDir = GetString(features, OutputDirStringValue); string outDir = GetString(features, OutputDirStringValue);
// Get only files from the inputs // Get only files from the inputs
List<string> files = DirectoryExtensions.GetFilesOnly(Inputs); List<ParentablePath> files = DirectoryExtensions.GetFilesOnly(Inputs);
foreach (string file in files) foreach (ParentablePath file in files)
{ {
Skipper.RestoreHeader(file, outDir); Skipper.RestoreHeader(file.CurrentPath, outDir);
} }
} }
} }
@@ -3116,12 +3116,12 @@ The following systems have headers that this program can work with:
// Get a list of files from the input datfiles // Get a list of files from the input datfiles
var datfiles = GetList(features, DatListValue); var datfiles = GetList(features, DatListValue);
datfiles = DirectoryExtensions.GetFilesOnly(datfiles); var datfilePaths = DirectoryExtensions.GetFilesOnly(datfiles);
// If we are in individual mode, process each DAT on their own, appending the DAT name to the output dir // If we are in individual mode, process each DAT on their own, appending the DAT name to the output dir
if (GetBoolean(features, IndividualValue)) if (GetBoolean(features, IndividualValue))
{ {
foreach (string datfile in datfiles) foreach (ParentablePath datfile in datfilePaths)
{ {
DatFile datdata = DatFile.Create(); DatFile datdata = DatFile.Create();
datdata.Parse(datfile, 99, keep: true); datdata.Parse(datfile, 99, keep: true);
@@ -3141,7 +3141,7 @@ The following systems have headers that this program can work with:
// Add all of the input DATs into one huge internal DAT // Add all of the input DATs into one huge internal DAT
DatFile datdata = DatFile.Create(); DatFile datdata = DatFile.Create();
foreach (string datfile in datfiles) foreach (ParentablePath datfile in datfilePaths)
{ {
datdata.Parse(datfile, 99, keep: true); datdata.Parse(datfile, 99, keep: true);
} }
@@ -3540,7 +3540,7 @@ The stats that are outputted are as follows:
{ {
// Get a list of files from the input datfiles // Get a list of files from the input datfiles
var datfiles = GetList(features, DatListValue); var datfiles = GetList(features, DatListValue);
datfiles = DirectoryExtensions.GetFilesOnly(datfiles); var datfilePaths = DirectoryExtensions.GetFilesOnly(datfiles);
// Get feature flags // Get feature flags
bool chdsAsFiles = GetBoolean(features, ChdsAsFilesValue); bool chdsAsFiles = GetBoolean(features, ChdsAsFilesValue);
@@ -3553,7 +3553,7 @@ The stats that are outputted are as follows:
// If we are in individual mode, process each DAT on their own // If we are in individual mode, process each DAT on their own
if (GetBoolean(features, IndividualValue)) if (GetBoolean(features, IndividualValue))
{ {
foreach (string datfile in datfiles) foreach (ParentablePath datfile in datfilePaths)
{ {
DatFile datdata = DatFile.Create(); DatFile datdata = DatFile.Create();
datdata.Parse(datfile, 99, keep: true); datdata.Parse(datfile, 99, keep: true);
@@ -3573,7 +3573,7 @@ The stats that are outputted are as follows:
// Add all of the input DATs into one huge internal DAT // Add all of the input DATs into one huge internal DAT
DatFile datdata = DatFile.Create(); DatFile datdata = DatFile.Create();
foreach (string datfile in datfiles) foreach (ParentablePath datfile in datfilePaths)
{ {
datdata.Parse(datfile, 99, keep: true); datdata.Parse(datfile, 99, keep: true);
filter.FilterDatFile(datdata, true); filter.FilterDatFile(datdata, true);