[ISO9660] Do not declare the presence of MODE 2 sub-headers based on long sector content, but on tag presence on media image.

This commit is contained in:
2024-12-31 06:06:29 +00:00
parent abf69a3df6
commit b7dabe699a

View File

@@ -74,7 +74,9 @@ public sealed partial class ISO9660
if(entry.Flags.HasFlag(FileFlags.Directory) || entry.Extents == null || entry.Extents.Count == 0)
return ErrorNumber.NoError;
ErrorNumber errno = _image.ReadSectorLong(entry.Extents[0].extent * _blockSize / 2048, out byte[] sector);
ErrorNumber errno = _image.ReadSectorTag(entry.Extents[0].extent * _blockSize / 2048,
SectorTagType.CdSectorSubHeader,
out byte[] sector);
if(errno != ErrorNumber.NoError) return errno;