If use path table option is indicated in ISO9660, use it also for the root directory.

This commit is contained in:
2020-06-25 23:05:43 +01:00
parent a6229f524a
commit 61eebfa916

View File

@@ -358,6 +358,30 @@ namespace Aaru.Filesystems.ISO9660
if(usePathTable && pathTableData.Length == 1)
usePathTable = false;
if(usePathTable && !cdi)
{
rootLocation = pathTable[0].Extent;
byte[] firstRootSector = ReadSector(rootLocation);
if(highSierra)
{
HighSierraDirectoryRecord rootEntry =
Marshal.ByteArrayToStructureLittleEndian<HighSierraDirectoryRecord>(firstRootSector);
rootSize = rootEntry.size;
}
else
{
DirectoryRecord rootEntry =
Marshal.ByteArrayToStructureLittleEndian<DirectoryRecord>(firstRootSector);
rootSize = rootEntry.size;
}
rootXattrLength = pathTable[0].XattrLength;
}
try
{
byte[] rootDir = ReadSingleExtent(0, rootSize, rootLocation);