mirror of
https://github.com/aaru-dps/Aaru.Server.git
synced 2025-12-16 19:24:27 +00:00
REFACTOR: All refactor in DiscImageChef.
This commit is contained in:
@@ -128,7 +128,8 @@ namespace DiscImageChef.Commands
|
||||
image1Info.ImageHasPartitions = input1Format.ImageHasPartitions();
|
||||
#pragma warning disable RECS0022 // A catch clause that catches System.Exception and has an empty body
|
||||
try { image1Sessions = input1Format.GetSessions(); }
|
||||
catch { }
|
||||
catch { // ignored
|
||||
}
|
||||
#pragma warning restore RECS0022 // A catch clause that catches System.Exception and has an empty body
|
||||
image1Info.ImageHasSessions |= image1Sessions.Count > 0;
|
||||
image1Info.ImageSize = input1Format.GetImageSize();
|
||||
@@ -179,14 +180,16 @@ namespace DiscImageChef.Commands
|
||||
image1DiskTags.Add(disktag, temparray);
|
||||
}
|
||||
#pragma warning disable RECS0022 // A catch clause that catches System.Exception and has an empty body
|
||||
catch { }
|
||||
catch { // ignored
|
||||
}
|
||||
#pragma warning restore RECS0022 // A catch clause that catches System.Exception and has an empty body
|
||||
}
|
||||
|
||||
image2Info.ImageHasPartitions = input2Format.ImageHasPartitions();
|
||||
#pragma warning disable RECS0022 // A catch clause that catches System.Exception and has an empty body
|
||||
try { image2Sessions = input2Format.GetSessions(); }
|
||||
catch { }
|
||||
catch { // ignored
|
||||
}
|
||||
#pragma warning restore RECS0022 // A catch clause that catches System.Exception and has an empty body
|
||||
image2Info.ImageHasSessions |= image2Sessions.Count > 0;
|
||||
image2Info.ImageSize = input2Format.GetImageSize();
|
||||
@@ -237,7 +240,8 @@ namespace DiscImageChef.Commands
|
||||
image2DiskTags.Add(disktag, temparray);
|
||||
}
|
||||
#pragma warning disable RECS0022 // A catch clause that catches System.Exception and has an empty body
|
||||
catch { }
|
||||
catch { // ignored
|
||||
}
|
||||
#pragma warning restore RECS0022 // A catch clause that catches System.Exception and has an empty body
|
||||
}
|
||||
|
||||
@@ -443,8 +447,7 @@ namespace DiscImageChef.Commands
|
||||
{
|
||||
byte[] image1Sector = input1Format.ReadSector(sector);
|
||||
byte[] image2Sector = input2Format.ReadSector(sector);
|
||||
bool different, sameSize;
|
||||
ArrayHelpers.CompareBytes(out different, out sameSize, image1Sector, image2Sector);
|
||||
ArrayHelpers.CompareBytes(out bool different, out bool sameSize, image1Sector, image2Sector);
|
||||
if(different)
|
||||
{
|
||||
imagesDiffer = true;
|
||||
@@ -459,14 +462,14 @@ namespace DiscImageChef.Commands
|
||||
}
|
||||
}
|
||||
#pragma warning disable RECS0022 // A catch clause that catches System.Exception and has an empty body
|
||||
catch { }
|
||||
catch { // ignored
|
||||
}
|
||||
#pragma warning restore RECS0022 // A catch clause that catches System.Exception and has an empty body
|
||||
}
|
||||
|
||||
DicConsole.WriteLine();
|
||||
|
||||
if(imagesDiffer) sb.AppendLine("Images differ");
|
||||
else sb.AppendLine("Images do not differ");
|
||||
sb.AppendLine(imagesDiffer ? "Images differ" : "Images do not differ");
|
||||
|
||||
DicConsole.WriteLine(sb.ToString());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user