Add support for Romeo.

This commit is contained in:
2019-07-23 06:20:00 +01:00
parent f9103579b1
commit dd6d6b072c
3 changed files with 13 additions and 8 deletions

View File

@@ -43,7 +43,8 @@ namespace DiscImageChef.Filesystems.ISO9660
Normal, Normal,
Vms, Vms,
Joliet, Joliet,
Rrip Rrip,
Romeo
} }
} }
} }

View File

@@ -139,9 +139,8 @@ namespace DiscImageChef.Filesystems.ISO9660
Flags = record.flags, Flags = record.flags,
Interleave = record.interleave, Interleave = record.interleave,
VolumeSequenceNumber = record.volume_sequence_number, VolumeSequenceNumber = record.volume_sequence_number,
Filename = Filename = Encoding.GetString(data, entryOff + DirectoryRecordSize, record.name_len),
Encoding.ASCII.GetString(data, entryOff + DirectoryRecordSize, record.name_len), Timestamp = DecodeHighSierraDateTime(record.date)
Timestamp = DecodeHighSierraDateTime(record.date)
}; };
if(!entries.ContainsKey(entry.Filename)) entries.Add(entry.Filename, entry); if(!entries.ContainsKey(entry.Filename)) entries.Add(entry.Filename, entry);
@@ -183,7 +182,7 @@ namespace DiscImageChef.Filesystems.ISO9660
joliet joliet
? Encoding.BigEndianUnicode.GetString(data, entryOff + DirectoryRecordSize, ? Encoding.BigEndianUnicode.GetString(data, entryOff + DirectoryRecordSize,
record.name_len) record.name_len)
: Encoding.ASCII.GetString(data, entryOff + DirectoryRecordSize, record.name_len), : Encoding.GetString(data, entryOff + DirectoryRecordSize, record.name_len),
FileUnitSize = record.file_unit_size, FileUnitSize = record.file_unit_size,
Interleave = record.interleave, Interleave = record.interleave,
VolumeSequenceNumber = record.volume_sequence_number, VolumeSequenceNumber = record.volume_sequence_number,
@@ -209,8 +208,8 @@ namespace DiscImageChef.Filesystems.ISO9660
? Encoding.BigEndianUnicode.GetString(data, ? Encoding.BigEndianUnicode.GetString(data,
entryOff + DirectoryRecordSize, entryOff + DirectoryRecordSize,
record.name_len) record.name_len)
: Encoding.ASCII.GetString(data, entryOff + DirectoryRecordSize, : Encoding.GetString(data, entryOff + DirectoryRecordSize,
record.name_len), record.name_len),
Timestamp = DecodeIsoDateTime(record.date), Timestamp = DecodeIsoDateTime(record.date),
AssociatedFile = entry AssociatedFile = entry
}; };

View File

@@ -16,7 +16,7 @@ namespace DiscImageChef.Filesystems.ISO9660
public Errno Mount(IMediaImage imagePlugin, Partition partition, Encoding encoding, public Errno Mount(IMediaImage imagePlugin, Partition partition, Encoding encoding,
Dictionary<string, string> options, string @namespace) Dictionary<string, string> options, string @namespace)
{ {
Encoding = encoding ?? Encoding.ASCII; Encoding = encoding ?? Encoding.GetEncoding(1252);
byte[] vdMagic = new byte[5]; // Volume Descriptor magic "CD001" byte[] vdMagic = new byte[5]; // Volume Descriptor magic "CD001"
byte[] hsMagic = new byte[5]; // Volume Descriptor magic "CDROM" byte[] hsMagic = new byte[5]; // Volume Descriptor magic "CDROM"
@@ -40,6 +40,9 @@ namespace DiscImageChef.Filesystems.ISO9660
case "rrip": case "rrip":
this.@namespace = Namespace.Rrip; this.@namespace = Namespace.Rrip;
break; break;
case "romeo":
this.@namespace = Namespace.Romeo;
break;
default: return Errno.InvalidArgument; default: return Errno.InvalidArgument;
} }
@@ -214,6 +217,8 @@ namespace DiscImageChef.Filesystems.ISO9660
? DecodeHighSierraDirectory(rootDir) ? DecodeHighSierraDirectory(rootDir)
: DecodeIsoDirectory(rootDir); : DecodeIsoDirectory(rootDir);
if(this.@namespace == Namespace.Romeo) Encoding = Encoding.ASCII;
XmlFsType.Type = fsFormat; XmlFsType.Type = fsFormat;
if(jolietvd != null && this.@namespace == Namespace.Joliet) if(jolietvd != null && this.@namespace == Namespace.Joliet)