[SimpleSort] Fix equivalence

This commit is contained in:
Matt Nadareski
2016-08-29 20:45:20 -07:00
parent 2e204d9473
commit b77cdff0cc
3 changed files with 4 additions and 5 deletions

View File

@@ -172,7 +172,7 @@ namespace SabreTools.Helper
{
bool equals = false;
if (!IsDisk &&
if (IsDisk &&
((String.IsNullOrEmpty(this.MD5) || String.IsNullOrEmpty(other.MD5)) || this.MD5 == other.MD5) &&
((String.IsNullOrEmpty(this.SHA1) || String.IsNullOrEmpty(other.SHA1)) || this.SHA1 == other.SHA1))
{
@@ -250,9 +250,7 @@ namespace SabreTools.Helper
dupefound = this.HashData.Equals(other.HashData, true);
}
return (this.Machine.Equals(other.Machine) &&
this.Name == other.Name &&
dupefound);
return dupefound;
}
}

View File

@@ -128,6 +128,7 @@ namespace SabreTools.Helper
{
List<Rom> roms = datdata.Files[key];
List<Rom> left = new List<Rom>();
foreach (Rom rom in roms)
{
if (IsDuplicate(rom, lastrom, logger))

View File

@@ -772,7 +772,7 @@ namespace SabreTools
}
else
{
string archiveFileName = Path.Combine(_outdir, found.Machine + ".zip");
string archiveFileName = Path.Combine(_outdir, found.Machine.Name + ".zip");
FileTools.CopyFileBetweenManagedArchives(input, archiveFileName, rom.Name, found.Name, _logger);
}
}