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:
@@ -164,8 +164,9 @@ namespace Aaru.Tests.Filesystems
|
||||
var filtersList = new FiltersList();
|
||||
IFilter inputFilter = filtersList.GetFilter(testFile);
|
||||
IMediaImage image = ImageFormat.Detect(inputFilter);
|
||||
ErrorNumber opened = image.Open(inputFilter);
|
||||
|
||||
if(!image.Open(inputFilter))
|
||||
if(opened != ErrorNumber.NoError)
|
||||
continue;
|
||||
|
||||
List<string> idPlugins;
|
||||
@@ -238,7 +239,7 @@ namespace Aaru.Tests.Filesystems
|
||||
if(path == "/")
|
||||
path = "";
|
||||
|
||||
Dictionary<string, FileData> children = new Dictionary<string, FileData>();
|
||||
Dictionary<string, FileData> children = new();
|
||||
fs.ReadDir(path, out List<string> contents);
|
||||
|
||||
if(contents is null)
|
||||
@@ -297,7 +298,7 @@ namespace Aaru.Tests.Filesystems
|
||||
if(path == "/")
|
||||
path = "";
|
||||
|
||||
List<string> expectedNotFound = new List<string>();
|
||||
List<string> expectedNotFound = new();
|
||||
|
||||
foreach(KeyValuePair<string, FileData> child in children)
|
||||
{
|
||||
@@ -402,7 +403,7 @@ namespace Aaru.Tests.Filesystems
|
||||
contents.Count == 0)
|
||||
return;
|
||||
|
||||
List<string> expectedNotFound = new List<string>();
|
||||
List<string> expectedNotFound = new();
|
||||
|
||||
foreach(KeyValuePair<string, string> xattr in xattrs)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user