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:
@@ -1315,10 +1315,11 @@ namespace Aaru.Core.Devices.Dumping
|
||||
var filters = new FiltersList();
|
||||
IFilter filter = filters.GetFilter(_outputPath);
|
||||
IMediaImage inputPlugin = ImageFormat.Detect(filter);
|
||||
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;
|
||||
}
|
||||
@@ -1354,7 +1355,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.BlockMedia[0].FileSystemInformation != null)
|
||||
filesystems.AddRange(from partition in sidecar.BlockMedia[0].FileSystemInformation
|
||||
|
||||
Reference in New Issue
Block a user