mirror of
https://github.com/claunia/SabreTools.git
synced 2025-12-16 19:14:27 +00:00
[SabreTools] Rename a couple variables
This commit is contained in:
@@ -178,7 +178,7 @@ namespace RombaSharp
|
||||
ArchiveScanLevel asl = ArchiveTools.GetArchiveScanLevelFromNumbers((onlyNeeded ? 0 : 1), (onlyNeeded ? 0 : 1), (onlyNeeded ? 0 : 1), (onlyNeeded ? 0 : 1));
|
||||
need.RebuildGeneric(onlyDirs, _depots.Keys.ToList()[0], false /*quickScan*/, false /*date*/,
|
||||
false /*delete*/, false /*inverse*/, OutputFormat.TorrentGzip, true /*romba*/, asl, false /*updateDat*/,
|
||||
null /*headerToCheckAgainst*/, true /* ignorechd */);
|
||||
null /*headerToCheckAgainst*/, true /* chdsAsFiles */);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -254,7 +254,7 @@ namespace RombaSharp
|
||||
// TODO: All instances of Hash.DeepHashes should be made into 0x0 eventually
|
||||
datdata.PopulateFromDir(input, Hash.DeepHashes /* omitFromScan */, true /* bare */, false /* archivesAsFiles */,
|
||||
SkipFileType.None, false /* addBlanks */, false /* addDate */, _tmpdir /* tempDir */, false /* copyFiles */,
|
||||
null /* headerToCheckAgainst */, true /* ignorechd */);
|
||||
null /* headerToCheckAgainst */, true /* chdsAsFiles */);
|
||||
datdata.WriteToFile("");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3475,9 +3475,9 @@ namespace SabreTools.Library.DatFiles
|
||||
/// <param name="outDir">Output directory to </param>
|
||||
/// <param name="copyFiles">True if files should be copied to the temp directory before hashing, false otherwise</param>
|
||||
/// <param name="headerToCheckAgainst">Populated string representing the name of the skipper to use, a blank string to use the first available checker, null otherwise</param>
|
||||
/// <param name="ignorechd">True if CHDs should be treated like regular files, false otherwise</param>
|
||||
/// <param name="chdsAsFiles">True if CHDs should be treated like regular files, false otherwise</param>
|
||||
public bool PopulateFromDir(string basePath, Hash omitFromScan, bool bare, bool archivesAsFiles, SkipFileType skipFileType,
|
||||
bool addBlanks, bool addDate, string tempDir, bool copyFiles, string headerToCheckAgainst, bool ignorechd)
|
||||
bool addBlanks, bool addDate, string tempDir, bool copyFiles, string headerToCheckAgainst, bool chdsAsFiles)
|
||||
{
|
||||
// If the description is defined but not the name, set the name from the description
|
||||
if (String.IsNullOrEmpty(Name) && !String.IsNullOrEmpty(Description))
|
||||
@@ -3508,7 +3508,7 @@ namespace SabreTools.Library.DatFiles
|
||||
Parallel.ForEach(files, Globals.ParallelOptions, item =>
|
||||
{
|
||||
CheckFileForHashes(item, basePath, omitFromScan, bare, archivesAsFiles, skipFileType,
|
||||
addBlanks, addDate, tempDir, copyFiles, headerToCheckAgainst, ignorechd);
|
||||
addBlanks, addDate, tempDir, copyFiles, headerToCheckAgainst, chdsAsFiles);
|
||||
});
|
||||
|
||||
// Find all top-level subfolders
|
||||
@@ -3519,7 +3519,7 @@ namespace SabreTools.Library.DatFiles
|
||||
Parallel.ForEach(subfiles, Globals.ParallelOptions, subitem =>
|
||||
{
|
||||
CheckFileForHashes(subitem, basePath, omitFromScan, bare, archivesAsFiles, skipFileType,
|
||||
addBlanks, addDate, tempDir, copyFiles, headerToCheckAgainst, ignorechd);
|
||||
addBlanks, addDate, tempDir, copyFiles, headerToCheckAgainst, chdsAsFiles);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -3576,7 +3576,7 @@ namespace SabreTools.Library.DatFiles
|
||||
else if (File.Exists(basePath))
|
||||
{
|
||||
CheckFileForHashes(basePath, Path.GetDirectoryName(Path.GetDirectoryName(basePath)), omitFromScan, bare, archivesAsFiles,
|
||||
skipFileType, addBlanks, addDate, tempDir, copyFiles, headerToCheckAgainst, ignorechd);
|
||||
skipFileType, addBlanks, addDate, tempDir, copyFiles, headerToCheckAgainst, chdsAsFiles);
|
||||
}
|
||||
|
||||
// Now that we're done, delete the temp folder (if it's not the default)
|
||||
@@ -3603,9 +3603,9 @@ namespace SabreTools.Library.DatFiles
|
||||
/// <param name="tempDir">Name of the directory to create a temp folder in (blank is current directory)</param>
|
||||
/// <param name="copyFiles">True if files should be copied to the temp directory before hashing, false otherwise</param>
|
||||
/// <param name="headerToCheckAgainst">Populated string representing the name of the skipper to use, a blank string to use the first available checker, null otherwise</param>
|
||||
/// <param name="ignorechd">True if CHDs should be treated like regular files, false otherwise</param>
|
||||
/// <param name="chdsAsFiles">True if CHDs should be treated like regular files, false otherwise</param>
|
||||
private void CheckFileForHashes(string item, string basePath, Hash omitFromScan, bool bare, bool archivesAsFiles,
|
||||
SkipFileType skipFileType, bool addBlanks, bool addDate, string tempDir, bool copyFiles, string headerToCheckAgainst, bool ignorechd)
|
||||
SkipFileType skipFileType, bool addBlanks, bool addDate, string tempDir, bool copyFiles, string headerToCheckAgainst, bool chdsAsFiles)
|
||||
{
|
||||
// Define the temporary directory
|
||||
string tempSubDir = Path.GetFullPath(Path.Combine(tempDir, Path.GetRandomFileName())) + Path.DirectorySeparatorChar;
|
||||
@@ -3670,7 +3670,7 @@ namespace SabreTools.Library.DatFiles
|
||||
// If the extracted list is null, just scan the item itself
|
||||
if (extracted == null || archivesAsFiles)
|
||||
{
|
||||
ProcessFile(newItem, "", newBasePath, omitFromScan, addDate, headerToCheckAgainst, ignorechd);
|
||||
ProcessFile(newItem, "", newBasePath, omitFromScan, addDate, headerToCheckAgainst, chdsAsFiles);
|
||||
}
|
||||
// Otherwise, add all of the found items
|
||||
else
|
||||
@@ -3718,12 +3718,12 @@ namespace SabreTools.Library.DatFiles
|
||||
/// <param name="omitFromScan">Hash flag saying what hashes should not be calculated</param>
|
||||
/// <param name="addDate">True if dates should be archived for all files, false otherwise</param>
|
||||
/// <param name="headerToCheckAgainst">Populated string representing the name of the skipper to use, a blank string to use the first available checker, null otherwise</param>
|
||||
/// <param name="ignorechd">True if CHDs should be treated like regular files, false otherwise</param>
|
||||
/// <param name="chdsAsFiles">True if CHDs should be treated like regular files, false otherwise</param>
|
||||
private void ProcessFile(string item, string parent, string basePath, Hash omitFromScan,
|
||||
bool addDate, string headerToCheckAgainst, bool ignorechd)
|
||||
bool addDate, string headerToCheckAgainst, bool chdsAsFiles)
|
||||
{
|
||||
Globals.Logger.Verbose("'{0}' treated like a file", Path.GetFileName(item));
|
||||
DatItem datItem = FileTools.GetFileInfo(item, omitFromScan: omitFromScan, date: addDate, header: headerToCheckAgainst, ignorechd: ignorechd);
|
||||
DatItem datItem = FileTools.GetFileInfo(item, omitFromScan: omitFromScan, date: addDate, header: headerToCheckAgainst, chdsAsFiles: chdsAsFiles);
|
||||
|
||||
ProcessFileHelper(item, datItem, basePath, parent);
|
||||
}
|
||||
@@ -4048,11 +4048,11 @@ namespace SabreTools.Library.DatFiles
|
||||
/// <param name="archiveScanLevel">ArchiveScanLevel representing the archive handling levels</param>
|
||||
/// <param name="updateDat">True if the updated DAT should be output, false otherwise</param>
|
||||
/// <param name="headerToCheckAgainst">Populated string representing the name of the skipper to use, a blank string to use the first available checker, null otherwise</param>
|
||||
/// <param name="ignorechd">True if CHDs should be treated like regular files, false otherwise</param>
|
||||
/// <param name="chdsAsFiles">True if CHDs should be treated like regular files, false otherwise</param>
|
||||
/// <returns>True if rebuilding was a success, false otherwise</returns>
|
||||
public bool RebuildGeneric(List<string> inputs, string outDir, bool quickScan, bool date,
|
||||
bool delete, bool inverse, OutputFormat outputFormat, bool romba, ArchiveScanLevel archiveScanLevel, bool updateDat,
|
||||
string headerToCheckAgainst, bool ignorechd)
|
||||
string headerToCheckAgainst, bool chdsAsFiles)
|
||||
{
|
||||
#region Perform setup
|
||||
|
||||
@@ -4132,7 +4132,7 @@ namespace SabreTools.Library.DatFiles
|
||||
{
|
||||
Globals.Logger.User("Checking file: {0}", input);
|
||||
RebuildGenericHelper(input, outDir, quickScan, date, delete, inverse,
|
||||
outputFormat, romba, archiveScanLevel, updateDat, headerToCheckAgainst, ignorechd);
|
||||
outputFormat, romba, archiveScanLevel, updateDat, headerToCheckAgainst, chdsAsFiles);
|
||||
}
|
||||
|
||||
// If the input is a directory
|
||||
@@ -4143,7 +4143,7 @@ namespace SabreTools.Library.DatFiles
|
||||
{
|
||||
Globals.Logger.User("Checking file: {0}", file);
|
||||
RebuildGenericHelper(file, outDir, quickScan, date, delete, inverse,
|
||||
outputFormat, romba, archiveScanLevel, updateDat, headerToCheckAgainst, ignorechd);
|
||||
outputFormat, romba, archiveScanLevel, updateDat, headerToCheckAgainst, chdsAsFiles);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -4179,10 +4179,10 @@ namespace SabreTools.Library.DatFiles
|
||||
/// <param name="archiveScanLevel">ArchiveScanLevel representing the archive handling levels</param>
|
||||
/// <param name="updateDat">True if the updated DAT should be output, false otherwise</param>
|
||||
/// <param name="headerToCheckAgainst">Populated string representing the name of the skipper to use, a blank string to use the first available checker, null otherwise</param>
|
||||
/// <param name="ignorechd">True if CHDs should be treated like regular files, false otherwise</param>
|
||||
/// <param name="chdsAsFiles">True if CHDs should be treated like regular files, false otherwise</param>
|
||||
private void RebuildGenericHelper(string file, string outDir, bool quickScan, bool date,
|
||||
bool delete, bool inverse, OutputFormat outputFormat, bool romba, ArchiveScanLevel archiveScanLevel, bool updateDat,
|
||||
string headerToCheckAgainst, bool ignorechd)
|
||||
string headerToCheckAgainst, bool chdsAsFiles)
|
||||
{
|
||||
// If we somehow have a null filename, return
|
||||
if (file == null)
|
||||
@@ -4202,7 +4202,7 @@ namespace SabreTools.Library.DatFiles
|
||||
{
|
||||
// TODO: All instances of Hash.DeepHashes should be made into 0x0 eventually
|
||||
DatItem fileinfo = FileTools.GetFileInfo(file, omitFromScan: (quickScan ? Hash.SecureHashes : Hash.DeepHashes),
|
||||
header: headerToCheckAgainst, ignorechd: ignorechd);
|
||||
header: headerToCheckAgainst, chdsAsFiles: chdsAsFiles);
|
||||
usedExternally = RebuildIndividualFile(fileinfo, file, outDir, date, inverse, outputFormat,
|
||||
romba, updateDat, null /* isZip */, headerToCheckAgainst);
|
||||
}
|
||||
@@ -4233,7 +4233,7 @@ namespace SabreTools.Library.DatFiles
|
||||
if (entries == null && File.Exists(file))
|
||||
{
|
||||
// TODO: All instances of Hash.DeepHashes should be made into 0x0 eventually
|
||||
DatItem fileinfo = FileTools.GetFileInfo(file, omitFromScan: (quickScan ? Hash.SecureHashes : Hash.DeepHashes), ignorechd: ignorechd);
|
||||
DatItem fileinfo = FileTools.GetFileInfo(file, omitFromScan: (quickScan ? Hash.SecureHashes : Hash.DeepHashes), chdsAsFiles: chdsAsFiles);
|
||||
usedExternally = RebuildIndividualFile(fileinfo, file, outDir, date, inverse, outputFormat,
|
||||
romba, updateDat, null /* isZip */, headerToCheckAgainst);
|
||||
}
|
||||
@@ -4743,9 +4743,9 @@ namespace SabreTools.Library.DatFiles
|
||||
/// <param name="hashOnly">True if only hashes should be checked, false for full file information</param>
|
||||
/// <param name="quickScan">True to enable external scanning of archives, false otherwise</param>
|
||||
/// <param name="headerToCheckAgainst">Populated string representing the name of the skipper to use, a blank string to use the first available checker, null otherwise</param>
|
||||
/// <param name="ignorechd">True if CHDs should be treated like regular files, false otherwise</param>
|
||||
/// <param name="chdsAsFiles">True if CHDs should be treated like regular files, false otherwise</param>
|
||||
/// <returns>True if verification was a success, false otherwise</returns>
|
||||
public bool VerifyGeneric(List<string> inputs, bool hashOnly, bool quickScan, string headerToCheckAgainst, bool ignorechd)
|
||||
public bool VerifyGeneric(List<string> inputs, bool hashOnly, bool quickScan, string headerToCheckAgainst, bool chdsAsFiles)
|
||||
{
|
||||
// TODO: We want the cross section of what's the folder and what's in the DAT. Right now, it just has what's in the DAT that's not in the folder
|
||||
bool success = true;
|
||||
@@ -4756,7 +4756,7 @@ namespace SabreTools.Library.DatFiles
|
||||
{
|
||||
// TODO: All instances of Hash.DeepHashes should be made into 0x0 eventually
|
||||
PopulateFromDir(input, (quickScan ? Hash.SecureHashes : Hash.DeepHashes) /* omitFromScan */, true /* bare */, false /* archivesAsFiles */,
|
||||
SkipFileType.None, false /* addBlanks */, false /* addDate */, "" /* tempDir */, false /* copyFiles */, headerToCheckAgainst, ignorechd);
|
||||
SkipFileType.None, false /* addBlanks */, false /* addDate */, "" /* tempDir */, false /* copyFiles */, headerToCheckAgainst, chdsAsFiles);
|
||||
}
|
||||
|
||||
// Setup the fixdat
|
||||
|
||||
@@ -212,10 +212,10 @@ namespace SabreTools.Library.Tools
|
||||
/// <param name="offset">Set a >0 number for getting hash for part of the file, 0 otherwise (default)</param>
|
||||
/// <param name="date">True if the file Date should be included, false otherwise (default)</param>
|
||||
/// <param name="header">Populated string representing the name of the skipper to use, a blank string to use the first available checker, null otherwise</param>
|
||||
/// <param name="ignorechd">True if CHDs should be treated like regular files, false otherwise</param>
|
||||
/// <param name="chdsAsFiles">True if CHDs should be treated like regular files, false otherwise</param>
|
||||
/// <returns>Populated DatItem object if success, empty one on error</returns>
|
||||
public static DatItem GetFileInfo(string input, Hash omitFromScan = 0x0,
|
||||
long offset = 0, bool date = false, string header = null, bool ignorechd = true)
|
||||
long offset = 0, bool date = false, string header = null, bool chdsAsFiles = true)
|
||||
{
|
||||
// Add safeguard if file doesn't exist
|
||||
if (!File.Exists(input))
|
||||
@@ -238,7 +238,7 @@ namespace SabreTools.Library.Tools
|
||||
|
||||
// Transform the stream and get the information from it
|
||||
rule.TransformStream(inputStream, outputStream, keepReadOpen: false, keepWriteOpen: true);
|
||||
datItem = GetStreamInfo(outputStream, outputStream.Length, omitFromScan: omitFromScan, keepReadOpen: false, ignorechd: ignorechd);
|
||||
datItem = GetStreamInfo(outputStream, outputStream.Length, omitFromScan: omitFromScan, keepReadOpen: false, chdsAsFiles: chdsAsFiles);
|
||||
|
||||
// Dispose of the streams
|
||||
outputStream.Dispose();
|
||||
@@ -248,13 +248,13 @@ namespace SabreTools.Library.Tools
|
||||
else
|
||||
{
|
||||
long length = new FileInfo(input).Length;
|
||||
datItem = GetStreamInfo(TryOpenRead(input), length, omitFromScan, offset, keepReadOpen: false, ignorechd: ignorechd);
|
||||
datItem = GetStreamInfo(TryOpenRead(input), length, omitFromScan, offset, keepReadOpen: false, chdsAsFiles: chdsAsFiles);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
long length = new FileInfo(input).Length;
|
||||
datItem = GetStreamInfo(TryOpenRead(input), length, omitFromScan, offset, keepReadOpen: false, ignorechd: ignorechd);
|
||||
datItem = GetStreamInfo(TryOpenRead(input), length, omitFromScan, offset, keepReadOpen: false, chdsAsFiles: chdsAsFiles);
|
||||
}
|
||||
|
||||
// Add unique data from the file
|
||||
@@ -439,7 +439,7 @@ namespace SabreTools.Library.Tools
|
||||
}
|
||||
|
||||
// Now add the information to the database if it's not already there
|
||||
Rom rom = (Rom)GetFileInfo(newfile, ignorechd: true);
|
||||
Rom rom = (Rom)GetFileInfo(newfile, chdsAsFiles: true);
|
||||
DatabaseTools.AddHeaderToDatabase(hstr, rom.SHA1, rule.SourceFile);
|
||||
|
||||
return true;
|
||||
@@ -538,7 +538,7 @@ namespace SabreTools.Library.Tools
|
||||
}
|
||||
|
||||
// First, get the SHA-1 hash of the file
|
||||
Rom rom = (Rom)GetFileInfo(file, ignorechd: true);
|
||||
Rom rom = (Rom)GetFileInfo(file, chdsAsFiles: true);
|
||||
|
||||
// Retrieve a list of all related headers from the database
|
||||
List<string> headers = DatabaseTools.RetrieveHeadersFromDatabase(rom.SHA1);
|
||||
@@ -762,13 +762,13 @@ namespace SabreTools.Library.Tools
|
||||
/// <param name="omitFromScan">Hash flag saying what hashes should not be calculated (defaults to none)</param>
|
||||
/// <param name="offset">Set a >0 number for getting hash for part of the file, 0 otherwise (default)</param>
|
||||
/// <param name="keepReadOpen">True if the underlying read stream should be kept open, false otherwise</param>
|
||||
/// <param name="ignorechd">True if CHDs should be treated like regular files, false otherwise</param>
|
||||
/// <param name="chdsAsFiles">True if CHDs should be treated like regular files, false otherwise</param>
|
||||
/// <returns>Populated DatItem object if success, empty one on error</returns>
|
||||
public static DatItem GetStreamInfo(Stream input, long size, Hash omitFromScan = 0x0,
|
||||
long offset = 0, bool keepReadOpen = false, bool ignorechd = true)
|
||||
long offset = 0, bool keepReadOpen = false, bool chdsAsFiles = true)
|
||||
{
|
||||
// We first check to see if it's a CHD
|
||||
if (ignorechd == false && IsValidCHD(input))
|
||||
if (chdsAsFiles == false && IsValidCHD(input))
|
||||
{
|
||||
// Seek to the starting position, if one is set
|
||||
try
|
||||
|
||||
@@ -43,7 +43,7 @@ namespace SabreTools
|
||||
/// <param name="superdat">True to enable SuperDAT-style reading, false otherwise</param>
|
||||
/// <param name="omitFromScan">Hash flag saying what hashes should not be calculated</param>
|
||||
/// <param name="removeDateFromAutomaticName">True if the date should be omitted from the DAT, false otherwise</param>
|
||||
/// <param name="parseArchivesAsFiles">True if archives should be treated as files, false otherwise</param>
|
||||
/// <param name="archivesAsFiles">True if archives should be treated as files, false otherwise</param>
|
||||
/// <param name="skipFileType">Type of files that should be skipped on scan</param>
|
||||
/// <param name="addBlankFilesForEmptyFolder">True if blank items should be created for empty folders, false otherwise</param>
|
||||
/// <param name="addFileDates">True if dates should be archived for all files, false otherwise</param>
|
||||
@@ -52,7 +52,7 @@ namespace SabreTools
|
||||
/// <param name="outDir">Name of the directory to output the DAT to (blank is the current directory)</param>
|
||||
/// <param name="copyFiles">True if files should be copied to the temp directory before hashing, false otherwise</param>
|
||||
/// <param name="headerToCheckAgainst">Populated string representing the name of the skipper to use, a blank string to use the first available checker, null otherwise</param>
|
||||
/// <param name="ignorechd">True if CHDs should be treated like regular files, false otherwise</param>
|
||||
/// <param name="chdsAsFiles">True if CHDs should be treated like regular files, false otherwise</param>
|
||||
private static void InitDatFromDir(List<string> inputs,
|
||||
/* Normal DAT header info */
|
||||
string filename,
|
||||
@@ -75,7 +75,7 @@ namespace SabreTools
|
||||
bool superdat,
|
||||
Hash omitFromScan,
|
||||
bool removeDateFromAutomaticName,
|
||||
bool parseArchivesAsFiles,
|
||||
bool archivesAsFiles,
|
||||
SkipFileType skipFileType,
|
||||
bool addBlankFilesForEmptyFolder,
|
||||
bool addFileDates,
|
||||
@@ -85,7 +85,7 @@ namespace SabreTools
|
||||
string outDir,
|
||||
bool copyFiles,
|
||||
string headerToCheckAgainst,
|
||||
bool ignorechd)
|
||||
bool chdsAsFiles)
|
||||
{
|
||||
ForcePacking fp = ForcePacking.None;
|
||||
switch (forcepack?.ToLowerInvariant())
|
||||
@@ -136,8 +136,8 @@ namespace SabreTools
|
||||
DatFile datdata = new DatFile(basedat);
|
||||
|
||||
string basePath = Path.GetFullPath(path);
|
||||
bool success = datdata.PopulateFromDir(basePath, omitFromScan, removeDateFromAutomaticName, parseArchivesAsFiles,
|
||||
skipFileType, addBlankFilesForEmptyFolder, addFileDates, tempDir, copyFiles, headerToCheckAgainst, ignorechd);
|
||||
bool success = datdata.PopulateFromDir(basePath, omitFromScan, removeDateFromAutomaticName, archivesAsFiles,
|
||||
skipFileType, addBlankFilesForEmptyFolder, addFileDates, tempDir, copyFiles, headerToCheckAgainst, chdsAsFiles);
|
||||
|
||||
// If it was a success, write the DAT out
|
||||
if (success)
|
||||
@@ -331,10 +331,10 @@ namespace SabreTools
|
||||
/// <param name="updateDat">True if the updated DAT should be output, false otherwise</param>
|
||||
/// <param name="headerToCheckAgainst">Populated string representing the name of the skipper to use, a blank string to use the first available checker, null otherwise</param>
|
||||
/// <param name="splitType">Type of the split that should be performed (split, merged, fully merged)</param>
|
||||
/// <param name="ignorechd">True if CHDs should be treated like regular files, false otherwise</param>
|
||||
/// <param name="chdsAsFiles">True if CHDs should be treated like regular files, false otherwise</param>
|
||||
private static void InitSort(List<string> datfiles, List<string> inputs, string outDir, bool quickScan, bool date, bool delete,
|
||||
bool inverse, OutputFormat outputFormat, bool romba, int sevenzip, int gz, int rar, int zip, bool updateDat, string headerToCheckAgainst,
|
||||
SplitType splitType, bool ignorechd)
|
||||
SplitType splitType, bool chdsAsFiles)
|
||||
{
|
||||
// Get the archive scanning level
|
||||
ArchiveScanLevel asl = ArchiveTools.GetArchiveScanLevelFromNumbers(sevenzip, gz, rar, zip);
|
||||
@@ -354,7 +354,7 @@ namespace SabreTools
|
||||
watch.Stop();
|
||||
|
||||
datdata.RebuildGeneric(inputs, outDir, quickScan, date, delete, inverse, outputFormat, romba, asl,
|
||||
updateDat, headerToCheckAgainst, ignorechd);
|
||||
updateDat, headerToCheckAgainst, chdsAsFiles);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -743,9 +743,9 @@ namespace SabreTools
|
||||
/// <param name="quickScan">True to enable external scanning of archives, false otherwise</param>
|
||||
/// <param name="headerToCheckAgainst">Populated string representing the name of the skipper to use, a blank string to use the first available checker, null otherwise</param>
|
||||
/// <param name="splitType">Type of the split that should be performed (split, merged, fully merged)</param>
|
||||
/// <param name="ignorechd">True if CHDs should be treated like regular files, false otherwise</param>
|
||||
/// <param name="chdsAsFiles">True if CHDs should be treated like regular files, false otherwise</param>
|
||||
private static void InitVerify(List<string> datfiles, List<string> inputs, bool hashOnly, bool quickScan,
|
||||
string headerToCheckAgainst, SplitType splitType, bool ignorechd)
|
||||
string headerToCheckAgainst, SplitType splitType, bool chdsAsFiles)
|
||||
{
|
||||
// Get the archive scanning level
|
||||
ArchiveScanLevel asl = ArchiveTools.GetArchiveScanLevelFromNumbers(1, 1, 1, 1);
|
||||
@@ -764,7 +764,7 @@ namespace SabreTools
|
||||
|
||||
watch.Stop();
|
||||
|
||||
datdata.VerifyGeneric(inputs, hashOnly, quickScan, headerToCheckAgainst, ignorechd);
|
||||
datdata.VerifyGeneric(inputs, hashOnly, quickScan, headerToCheckAgainst, chdsAsFiles);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -90,7 +90,9 @@ namespace SabreTools
|
||||
// User flags
|
||||
bool addBlankFilesForEmptyFolder = false,
|
||||
addFileDates = false,
|
||||
archivesAsFiles = false,
|
||||
basedat = false,
|
||||
chdsAsFiles = false,
|
||||
cleanGameNames = false,
|
||||
copyFiles = false,
|
||||
datPrefix = false,
|
||||
@@ -98,12 +100,10 @@ namespace SabreTools
|
||||
descAsName = false,
|
||||
excludeOf = false,
|
||||
hashOnly = false,
|
||||
ignorechd = false,
|
||||
inplace = true,
|
||||
inverse = false,
|
||||
merge = false,
|
||||
oneGameOneRegion = false,
|
||||
parseArchivesAsFiles = false,
|
||||
quickScan = false,
|
||||
quotes = false,
|
||||
remext = false,
|
||||
@@ -374,7 +374,7 @@ namespace SabreTools
|
||||
break;
|
||||
case "-f":
|
||||
case "--files":
|
||||
parseArchivesAsFiles = true;
|
||||
archivesAsFiles = true;
|
||||
break;
|
||||
case "-gdd":
|
||||
case "--game-dedup":
|
||||
@@ -394,7 +394,7 @@ namespace SabreTools
|
||||
break;
|
||||
case "-ic":
|
||||
case "--ignore-chd":
|
||||
ignorechd = true;
|
||||
chdsAsFiles = true;
|
||||
break;
|
||||
case "-in":
|
||||
case "--inverse":
|
||||
@@ -1254,8 +1254,8 @@ namespace SabreTools
|
||||
if (datFromDir)
|
||||
{
|
||||
InitDatFromDir(inputs, filename, name, description, category, version, author, email, homepage, url, comment,
|
||||
forcepack, excludeOf, sceneDateStrip, datFormat, romba, superdat, omitFromScan, removeDateFromAutomaticName, parseArchivesAsFiles,
|
||||
skipFileType, addBlankFilesForEmptyFolder, addFileDates, tempDir, outDir, copyFiles, header, ignorechd);
|
||||
forcepack, excludeOf, sceneDateStrip, datFormat, romba, superdat, omitFromScan, removeDateFromAutomaticName, archivesAsFiles,
|
||||
skipFileType, addBlankFilesForEmptyFolder, addFileDates, tempDir, outDir, copyFiles, header, chdsAsFiles);
|
||||
}
|
||||
|
||||
// If we're in header extract and remove mode
|
||||
@@ -1274,7 +1274,7 @@ namespace SabreTools
|
||||
else if (sort)
|
||||
{
|
||||
InitSort(datfiles, inputs, outDir, quickScan, addFileDates, delete, inverse,
|
||||
outputFormat, romba, sevenzip, gz, rar, zip, updateDat, header, splitType, ignorechd);
|
||||
outputFormat, romba, sevenzip, gz, rar, zip, updateDat, header, splitType, chdsAsFiles);
|
||||
}
|
||||
|
||||
// If we're using the sorter from depot
|
||||
@@ -1326,7 +1326,7 @@ namespace SabreTools
|
||||
// If we're using the verifier
|
||||
else if (verify)
|
||||
{
|
||||
InitVerify(datfiles, inputs, hashOnly, quickScan, header, splitType, ignorechd);
|
||||
InitVerify(datfiles, inputs, hashOnly, quickScan, header, splitType, chdsAsFiles);
|
||||
}
|
||||
|
||||
// If we're using the depot verifier
|
||||
|
||||
Reference in New Issue
Block a user