[ZOO] Decode attributes.

This commit is contained in:
2025-08-26 02:51:51 +01:00
parent 4267b0eb7c
commit 531fb6c7b0

View File

@@ -107,7 +107,7 @@ public sealed partial class Zoo
/// <inheritdoc />
public ErrorNumber GetAttributes(int entryNumber, out FileAttributes attributes)
{
// TODO: Decode them
// DOS version of ZOO ignores the attributes, so we just say it's a file
attributes = FileAttributes.None;
if(!Opened) return ErrorNumber.NotOpened;
@@ -162,6 +162,9 @@ public sealed partial class Zoo
LastWriteTimeUtc = DateHandlers.DosToDateTime(entry.date, entry.time) // TODO: Handle tz, when not 127
};
// POSIX permissions, DOS version of ZOO basically ignored the attributes
if((entry.fattr & 1 << 22) > 0) stat.Mode = entry.fattr & 0x1ff;
return ErrorNumber.NoError;
}