diff --git a/Aaru.Core/Sidecar/OpticalDisc.cs b/Aaru.Core/Sidecar/OpticalDisc.cs index e3c8e9877..d1d9aed26 100644 --- a/Aaru.Core/Sidecar/OpticalDisc.cs +++ b/Aaru.Core/Sidecar/OpticalDisc.cs @@ -537,9 +537,27 @@ void OpticalDisc(IOpticalMediaImage image, Guid filterId, string imagePath, File if(!fs.Identify(image, partition)) continue; - fs.GetInformation(image, partition, encoding, out _, out FileSystem fsMetadata); - lstFs.Add(fsMetadata); - Statistics.AddFilesystem(fsMetadata.Type); + FileSystem fsMetadata = new(); + + if(fs is IReadOnlyFilesystem rofs && + rofs.Mount(image, partition, encoding, null, null) == ErrorNumber.NoError) + { + UpdateStatus(string.Format(Localization.Core.Mounting_0, rofs.Metadata.Type)); + + rofs.Metadata.Contents = Files(rofs); + + lstFs.Add(rofs.Metadata); + Statistics.AddFilesystem(rofs.Metadata.Type); + + rofs.Unmount(); + } + else + { + fs.GetInformation(image, partition, encoding, out _, out fsMetadata); + + lstFs.Add(fsMetadata); + Statistics.AddFilesystem(fsMetadata.Type); + } dskType = fsMetadata.Type switch { @@ -597,9 +615,27 @@ void OpticalDisc(IOpticalMediaImage image, Guid filterId, string imagePath, File if(!fs.Identify(image, xmlPart)) continue; - fs.GetInformation(image, xmlPart, encoding, out _, out FileSystem fsMetadata); - lstFs.Add(fsMetadata); - Statistics.AddFilesystem(fsMetadata.Type); + FileSystem fsMetadata = new(); + + if(fs is IReadOnlyFilesystem rofs && + rofs.Mount(image, xmlPart, encoding, null, null) == ErrorNumber.NoError) + { + UpdateStatus(string.Format(Localization.Core.Mounting_0, rofs.Metadata.Type)); + + rofs.Metadata.Contents = Files(rofs); + + lstFs.Add(rofs.Metadata); + Statistics.AddFilesystem(rofs.Metadata.Type); + + rofs.Unmount(); + } + else + { + fs.GetInformation(image, xmlPart, encoding, out _, out fsMetadata); + + lstFs.Add(fsMetadata); + Statistics.AddFilesystem(fsMetadata.Type); + } dskType = fsMetadata.Type switch {