I am trying to read an ISO-9660 file, which is about 7 GB, and I get the following error using CDReader()
Failed to read whole directory
at DiscUtils.Iso9660.ReaderDirectory..ctor(IsoContext context, DirectoryRecord dirEntry)
at DiscUtils.Iso9660.VfsCDReader..ctor(Stream data, Boolean joliet, Boolean hideVersions)
at DiscUtils.Iso9660.CDReader..ctor(Stream data, Boolean joliet)
I am using this stream:
Stream isoStream = System.IO.File.Open(isoFile, FileMode.Open)
I have been debugging and noticed that ExtentStream.Read method reads 0 bytes, which is the cause of the error. I have seen that the stream is starting at a position larger than the file size.
_isoStream.Position = _position + (_startBlock * (long)IsoUtilities.SectorSize);
int numRead = _isoStream.Read(buffer, offset, toRead);
# _isoStream values:
Length = 7366377472
Position = 5908262479872
Do you know why is this happening? Is there any way I can make this work?