mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
Refactor IMediaImage.Open to return error status instead of boolean.
This commit is contained in:
@@ -64,10 +64,11 @@ namespace Aaru.Core.Devices.Dumping
|
||||
IFilter filter = filters.GetFilter(_outputPath);
|
||||
IMediaImage inputPlugin = ImageFormat.Detect(filter);
|
||||
totalChkDuration = 0;
|
||||
ErrorNumber opened = inputPlugin.Open(filter);
|
||||
|
||||
if(!inputPlugin.Open(filter))
|
||||
if(opened != ErrorNumber.NoError)
|
||||
{
|
||||
StoppingErrorMessage?.Invoke("Could not open created image.");
|
||||
StoppingErrorMessage?.Invoke($"Error {opened} opening created image.");
|
||||
|
||||
return;
|
||||
}
|
||||
@@ -101,7 +102,7 @@ namespace Aaru.Core.Devices.Dumping
|
||||
sidecar = _preSidecar;
|
||||
}
|
||||
|
||||
List<(ulong start, string type)> filesystems = new List<(ulong start, string type)>();
|
||||
List<(ulong start, string type)> filesystems = new();
|
||||
|
||||
if(sidecar.OpticalDisc[0].Track != null)
|
||||
filesystems.AddRange(from xmlTrack in sidecar.OpticalDisc[0].Track
|
||||
|
||||
Reference in New Issue
Block a user