Rename games in diff (dupes/nodupes) and help fix output redirect

This commit is contained in:
Matt Nadareski
2016-05-27 13:04:53 -07:00
parent b9d6a15a08
commit 9d855e23ac
2 changed files with 10 additions and 4 deletions

View File

@@ -199,9 +199,12 @@ namespace SabreTools
{ {
if (rom.Dupe < DupeType.ExternalHash) if (rom.Dupe < DupeType.ExternalHash)
{ {
RomData newrom = rom;
newrom.Game += " (" + Path.GetFileNameWithoutExtension(_inputs[newrom.SystemID].Split('¬')[0]) + ")";
if (outerDiffData.Roms.ContainsKey(key)) if (outerDiffData.Roms.ContainsKey(key))
{ {
outerDiffData.Roms[key].Add(rom); outerDiffData.Roms[key].Add(newrom);
} }
else else
{ {
@@ -284,9 +287,12 @@ namespace SabreTools
{ {
if (rom.Dupe >= DupeType.ExternalHash) if (rom.Dupe >= DupeType.ExternalHash)
{ {
RomData newrom = rom;
newrom.Game += " (" + Path.GetFileNameWithoutExtension(_inputs[newrom.SystemID].Split('¬')[0]) + ")";
if (dupeData.Roms.ContainsKey(key)) if (dupeData.Roms.ContainsKey(key))
{ {
dupeData.Roms[key].Add(rom); dupeData.Roms[key].Add(newrom);
} }
else else
{ {
@@ -370,7 +376,7 @@ namespace SabreTools
} }
else if (!String.IsNullOrEmpty(_outdir)) else if (!String.IsNullOrEmpty(_outdir))
{ {
path = _outdir + (_inputs[j].Split('¬')[0].Remove(0, _inputs[j].Split('¬')[1].Length)); path = _outdir + (Path.GetDirectoryName(_inputs[j].Split('¬')[0]).Remove(0, _inputs[j].Split('¬')[1].Length));
} }
Output.WriteDatfile(diffData, path, _logger); Output.WriteDatfile(diffData, path, _logger);

View File

@@ -123,7 +123,7 @@ Options:
-b, --bare Don't include date in file name -b, --bare Don't include date in file name
-u, --unzip Force unzipping in created DAT -u, --unzip Force unzipping in created DAT
-o, --old Output DAT in CMP format instead of XML -o, --old Output DAT in CMP format instead of XML
-out= Output directory (overridden by --cascade) -out= Output directory (overridden by --inplace)
-sd, --superdat Enable SuperDAT creation -sd, --superdat Enable SuperDAT creation
-n=, --name= Set the internal name of the DAT -n=, --name= Set the internal name of the DAT
-d=, --desc= Set the filename and description of the DAT -d=, --desc= Set the filename and description of the DAT