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)
|
if (useGames)
|
||||||
Items.BucketBy(BucketedBy.Game, DedupeType.None);
|
Items.BucketBy(BucketedBy.Game, DedupeType.None);
|
||||||
else
|
else
|
||||||
Items.BucketBy(BucketedBy.CRC, DedupeType.Full);
|
Items.BucketBy(BucketedBy.CRC, DedupeType.None);
|
||||||
|
|
||||||
// Now we want to compare each input DAT against the base
|
// Now we want to compare each input DAT against the base
|
||||||
foreach (ParentablePath path in inputs)
|
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>
|
/// <remarks>The Stream is assumed to be in the proper position for a given test</remarks>
|
||||||
public bool Passes(Stream input)
|
public bool Passes(Stream input)
|
||||||
{
|
{
|
||||||
bool result = true;
|
#if NET_FRAMEWORK
|
||||||
switch (Type)
|
switch (Type)
|
||||||
{
|
{
|
||||||
case HeaderSkipTest.And:
|
case HeaderSkipTest.And:
|
||||||
@@ -68,9 +68,20 @@ namespace SabreTools.Library.Skippers
|
|||||||
return CheckOr(input);
|
return CheckOr(input);
|
||||||
case HeaderSkipTest.Xor:
|
case HeaderSkipTest.Xor:
|
||||||
return CheckXor(input);
|
return CheckXor(input);
|
||||||
|
default:
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
return result;
|
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
|
#region Checking Helpers
|
||||||
|
|||||||
@@ -181,10 +181,6 @@ namespace SabreTools.Features
|
|||||||
else
|
else
|
||||||
datHeaders = userInputDat.PopulateUserData(inputFileNames, Filter);
|
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
|
// Output only DatItems that are duplicated across inputs
|
||||||
if (updateMode.HasFlag(UpdateMode.DiffDupesOnly))
|
if (updateMode.HasFlag(UpdateMode.DiffDupesOnly))
|
||||||
userInputDat.DiffDuplicates(inputFileNames, OutputDir);
|
userInputDat.DiffDuplicates(inputFileNames, OutputDir);
|
||||||
@@ -230,6 +226,11 @@ namespace SabreTools.Features
|
|||||||
updateFields,
|
updateFields,
|
||||||
GetBoolean(features, OnlySameValue));
|
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