Fix extended attributes in ISO9660. Fixes #360

This commit is contained in:
2020-11-07 01:17:06 +00:00
parent 9df1fd7c15
commit c45f1bff6d
4 changed files with 67 additions and 96 deletions

View File

@@ -83,10 +83,18 @@ namespace Aaru.Filesystems
entry.Extents.Count == 0)
return Errno.NoError;
byte[] sector = _image.ReadSectorLong((entry.Extents[0].extent * _blockSize) / 2048);
// TODO: No more exceptions
try
{
byte[] sector = _image.ReadSectorLong((entry.Extents[0].extent * _blockSize) / 2048);
if(sector[15] != 2)
if(sector[15] != 2)
return Errno.NoError;
}
catch
{
return Errno.NoError;
}
xattrs.Add("org.iso.mode2.subheader");
xattrs.Add("org.iso.mode2.subheader.copy");
@@ -115,7 +123,7 @@ namespace Aaru.Filesystems
if(entry.Extents is null)
return Errno.InvalidArgument;
buf = ReadSingleExtent(0, entry.XattrLength, entry.Extents[0].extent);
buf = ReadSingleExtent(entry.XattrLength * _blockSize, entry.Extents[0].extent);
return Errno.NoError;
case "org.iso.9660.AssociatedFile":