mirror of
https://github.com/claunia/SabreTools.git
synced 2025-12-16 19:14:27 +00:00
[DatTools] Fix filter issue, rename file to match class
This commit is contained in:
@@ -52,7 +52,7 @@
|
|||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
|
||||||
<DebugSymbols>true</DebugSymbols>
|
<DebugSymbols>true</DebugSymbols>
|
||||||
<OutputPath>..\..\Debug-x64\</OutputPath>
|
<OutputPath>..\..\Debug-x64\</OutputPath>
|
||||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
<DefineConstants>TRACE;DEBUG</DefineConstants>
|
||||||
<DebugType>full</DebugType>
|
<DebugType>full</DebugType>
|
||||||
<PlatformTarget>x64</PlatformTarget>
|
<PlatformTarget>x64</PlatformTarget>
|
||||||
<ErrorReport>prompt</ErrorReport>
|
<ErrorReport>prompt</ErrorReport>
|
||||||
|
|||||||
@@ -1710,17 +1710,17 @@ namespace SabreTools.Helper
|
|||||||
string romtype, long sgt, long slt, long seq, string crc, string md5, string sha1, bool? nodump, Logger logger)
|
string romtype, long sgt, long slt, long seq, string crc, string md5, string sha1, bool? nodump, Logger logger)
|
||||||
{
|
{
|
||||||
// Clean the input strings
|
// Clean the input strings
|
||||||
outputDirectory = outputDirectory.Replace("\"", "");
|
|
||||||
if (outputDirectory != "")
|
|
||||||
{
|
|
||||||
outputDirectory = Path.GetFullPath(outputDirectory) + Path.DirectorySeparatorChar;
|
|
||||||
}
|
|
||||||
inputFileName = inputFileName.Replace("\"", "");
|
inputFileName = inputFileName.Replace("\"", "");
|
||||||
|
if (inputFileName != "")
|
||||||
|
{
|
||||||
|
inputFileName = Path.GetFullPath(inputFileName);
|
||||||
|
}
|
||||||
|
outputDirectory = outputDirectory.Replace("\"", "");
|
||||||
|
|
||||||
if (File.Exists(inputFileName))
|
if (File.Exists(inputFileName))
|
||||||
{
|
{
|
||||||
logger.User("Processing \"" + Path.GetFileName(inputFileName) + "\"");
|
logger.User("Processing \"" + Path.GetFileName(inputFileName) + "\"");
|
||||||
datdata = DatTools.Parse(inputFileName, 0, 0, datdata, logger, true, clean);
|
datdata = Parse(inputFileName, 0, 0, datdata, logger, true, clean);
|
||||||
datdata = Filter(datdata, gamename, romname, romtype, sgt, slt, seq, crc, md5, sha1, nodump, logger);
|
datdata = Filter(datdata, gamename, romname, romtype, sgt, slt, seq, crc, md5, sha1, nodump, logger);
|
||||||
|
|
||||||
// If the extension matches, append ".new" to the filename
|
// If the extension matches, append ".new" to the filename
|
||||||
@@ -1741,7 +1741,7 @@ namespace SabreTools.Helper
|
|||||||
logger.User("Processing \"" + Path.GetFullPath(file).Remove(0, inputFileName.Length) + "\"");
|
logger.User("Processing \"" + Path.GetFullPath(file).Remove(0, inputFileName.Length) + "\"");
|
||||||
DatData innerDatdata = (DatData)datdata.Clone();
|
DatData innerDatdata = (DatData)datdata.Clone();
|
||||||
innerDatdata.Roms = null;
|
innerDatdata.Roms = null;
|
||||||
innerDatdata = DatTools.Parse(file, 0, 0, innerDatdata, logger, true, clean);
|
innerDatdata = Parse(file, 0, 0, innerDatdata, logger, true, clean);
|
||||||
innerDatdata = Filter(innerDatdata, gamename, romname, romtype, sgt, slt, seq, crc, md5, sha1, nodump, logger);
|
innerDatdata = Filter(innerDatdata, gamename, romname, romtype, sgt, slt, seq, crc, md5, sha1, nodump, logger);
|
||||||
|
|
||||||
// If the extension matches, append ".new" to the filename
|
// If the extension matches, append ".new" to the filename
|
||||||
@@ -1922,6 +1922,9 @@ namespace SabreTools.Helper
|
|||||||
datdata.Roms[key] = null;
|
datdata.Roms[key] = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Resassign the new dictionary to the DatData object
|
||||||
|
datdata.Roms = dict;
|
||||||
|
|
||||||
return datdata;
|
return datdata;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -100,7 +100,7 @@
|
|||||||
<Compile Include="DatTools\Output.cs" />
|
<Compile Include="DatTools\Output.cs" />
|
||||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||||
<Compile Include="Remapping.cs" />
|
<Compile Include="Remapping.cs" />
|
||||||
<Compile Include="DatTools\RomManipulation.cs" />
|
<Compile Include="DatTools\DatTools.cs" />
|
||||||
<Compile Include="Data\Structs.cs" />
|
<Compile Include="Data\Structs.cs" />
|
||||||
<Compile Include="DatTools\Stats.cs" />
|
<Compile Include="DatTools\Stats.cs" />
|
||||||
<Compile Include="DatTools\Style.cs" />
|
<Compile Include="DatTools\Style.cs" />
|
||||||
|
|||||||
Binary file not shown.
Reference in New Issue
Block a user