From c31f5e096cef764bd033520019da434e74e14916 Mon Sep 17 00:00:00 2001 From: Natalia Portillo Date: Sat, 15 Jul 2017 01:38:00 +0100 Subject: [PATCH] Optical disc images should have a partition for the first track, like the other disc image formats do. --- DiscImageChef.DiscImages/ZZZRawImage.cs | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/DiscImageChef.DiscImages/ZZZRawImage.cs b/DiscImageChef.DiscImages/ZZZRawImage.cs index 4d2ca25ed..01df091cb 100644 --- a/DiscImageChef.DiscImages/ZZZRawImage.cs +++ b/DiscImageChef.DiscImages/ZZZRawImage.cs @@ -316,6 +316,12 @@ namespace DiscImageChef.ImagePlugins } } + if(ImageInfo.xmlMediaType == XmlMediaType.OpticalDisc) + { + ImageInfo.imageHasSessions = true; + ImageInfo.imageHasPartitions = true; + } + DicConsole.VerboseWriteLine("Raw disk image contains a disk of type {0}", ImageInfo.mediaType); return true; @@ -868,7 +874,23 @@ namespace DiscImageChef.ImagePlugins public override List GetPartitions() { - throw new FeatureUnsupportedImageException("Feature not supported by image format"); + if(ImageInfo.xmlMediaType == XmlMediaType.OpticalDisc) + { + List parts = new List(); + Partition part = new Partition + { + PartitionStartSector = 0, + PartitionSectors = ImageInfo.sectors, + PartitionStart = 0, + PartitionSequence = 0, + PartitionType = "MODE1/2048", + PartitionLength = ImageInfo.sectors * ImageInfo.sectorSize + }; + parts.Add(part); + return parts; + } + + throw new FeatureUnsupportedImageException("Feature not supported by image format"); } public override byte[] ReadSectorTag(ulong sectorAddress, uint track, SectorTagType tag)