mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
Fix ISO9660 with files of size 0.
This commit is contained in:
@@ -412,7 +412,8 @@ namespace Aaru.Filesystems.ISO9660
|
||||
entries[entry.Filename].XattrLength = entry.XattrLength;
|
||||
}
|
||||
|
||||
entries[entry.Filename].Extents.Add(entry.Extents[0]);
|
||||
if(entry.Extents?.Count > 0)
|
||||
entries[entry.Filename].Extents.Add(entry.Extents[0]);
|
||||
}
|
||||
else
|
||||
entries[entry.Filename] = entry;
|
||||
|
||||
@@ -175,12 +175,14 @@ namespace Aaru.Filesystems.ISO9660
|
||||
|
||||
stat = new FileEntryInfo
|
||||
{
|
||||
Attributes = new FileAttributes(), Blocks = (long)(entry.Size / 2048), // TODO: XA
|
||||
BlockSize = 2048, Length = (long)entry.Size,
|
||||
Inode = entry.Extents?[0].extent ?? 0, Links = 1,
|
||||
Attributes = new FileAttributes(), Blocks = (long)(entry.Size / 2048), // TODO: XA
|
||||
BlockSize = 2048, Length = (long)entry.Size, Links = 1,
|
||||
LastWriteTimeUtc = entry.Timestamp
|
||||
};
|
||||
|
||||
if(entry.Extents?.Count > 0)
|
||||
stat.Inode = entry.Extents[0].extent;
|
||||
|
||||
if(entry.Size % 2048 > 0)
|
||||
stat.Blocks++;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user