mirror of
https://github.com/claunia/SabreTools.git
synced 2025-12-16 19:14:27 +00:00
Fix update output issue
This commit is contained in:
@@ -739,7 +739,7 @@ namespace SabreTools.Library.DatFiles
|
||||
if (useGames)
|
||||
Items.BucketBy(BucketedBy.Game, DedupeType.None);
|
||||
else
|
||||
Items.BucketBy(BucketedBy.CRC, DedupeType.Full);
|
||||
Items.BucketBy(BucketedBy.CRC, DedupeType.None);
|
||||
|
||||
// Now we want to compare each input DAT against the base
|
||||
foreach (ParentablePath path in inputs)
|
||||
|
||||
@@ -55,7 +55,7 @@ namespace SabreTools.Library.Skippers
|
||||
/// <remarks>The Stream is assumed to be in the proper position for a given test</remarks>
|
||||
public bool Passes(Stream input)
|
||||
{
|
||||
bool result = true;
|
||||
#if NET_FRAMEWORK
|
||||
switch (Type)
|
||||
{
|
||||
case HeaderSkipTest.And:
|
||||
@@ -68,9 +68,20 @@ namespace SabreTools.Library.Skippers
|
||||
return CheckOr(input);
|
||||
case HeaderSkipTest.Xor:
|
||||
return CheckXor(input);
|
||||
default:
|
||||
return true;
|
||||
}
|
||||
|
||||
return result;
|
||||
#else
|
||||
return Type switch
|
||||
{
|
||||
HeaderSkipTest.And => CheckAnd(input),
|
||||
HeaderSkipTest.Data => CheckData(input),
|
||||
HeaderSkipTest.File => CheckFile(input),
|
||||
HeaderSkipTest.Or => CheckOr(input),
|
||||
HeaderSkipTest.Xor => CheckXor(input),
|
||||
_ => true,
|
||||
};
|
||||
#endif
|
||||
}
|
||||
|
||||
#region Checking Helpers
|
||||
|
||||
@@ -181,10 +181,6 @@ namespace SabreTools.Features
|
||||
else
|
||||
datHeaders = userInputDat.PopulateUserData(inputFileNames, Filter);
|
||||
|
||||
// Merge all input files and write
|
||||
if (updateMode.HasFlag(UpdateMode.Merge))
|
||||
userInputDat.MergeNoDiff(inputFileNames, OutputDir);
|
||||
|
||||
// Output only DatItems that are duplicated across inputs
|
||||
if (updateMode.HasFlag(UpdateMode.DiffDupesOnly))
|
||||
userInputDat.DiffDuplicates(inputFileNames, OutputDir);
|
||||
@@ -230,6 +226,11 @@ namespace SabreTools.Features
|
||||
updateFields,
|
||||
GetBoolean(features, OnlySameValue));
|
||||
}
|
||||
|
||||
// Merge all input files and write
|
||||
// This has to be last due to the SuperDAT handling
|
||||
if (updateMode.HasFlag(UpdateMode.Merge))
|
||||
userInputDat.MergeNoDiff(inputFileNames, OutputDir);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user