mirror of
https://github.com/aaru-dps/Aaru.Server.git
synced 2025-12-16 19:24:27 +00:00
🐛Corrected miscalling current encoding when identifying filesystems.
This commit is contained in:
@@ -66,7 +66,6 @@ namespace DiscImageChef.Filesystems
|
|||||||
|
|
||||||
public virtual bool Identify(IMediaImage imagePlugin, Partition partition)
|
public virtual bool Identify(IMediaImage imagePlugin, Partition partition)
|
||||||
{
|
{
|
||||||
currentEncoding = Encoding.BigEndianUnicode;
|
|
||||||
if(2 + partition.Start >= partition.End) return false;
|
if(2 + partition.Start >= partition.End) return false;
|
||||||
|
|
||||||
ushort drSigWord;
|
ushort drSigWord;
|
||||||
@@ -107,6 +106,7 @@ namespace DiscImageChef.Filesystems
|
|||||||
public virtual void GetInformation(IMediaImage imagePlugin, Partition partition, out string information,
|
public virtual void GetInformation(IMediaImage imagePlugin, Partition partition, out string information,
|
||||||
Encoding encoding)
|
Encoding encoding)
|
||||||
{
|
{
|
||||||
|
currentEncoding = Encoding.BigEndianUnicode;
|
||||||
information = "";
|
information = "";
|
||||||
|
|
||||||
ushort drSigWord;
|
ushort drSigWord;
|
||||||
|
|||||||
@@ -69,12 +69,12 @@ namespace DiscImageChef.Filesystems.ISO9660
|
|||||||
Array.Copy(vdSector, 0x001 + xaOff, vdMagic, 0, 5);
|
Array.Copy(vdSector, 0x001 + xaOff, vdMagic, 0, 5);
|
||||||
Array.Copy(vdSector, 0x009 + xaOff, hsMagic, 0, 5);
|
Array.Copy(vdSector, 0x009 + xaOff, hsMagic, 0, 5);
|
||||||
|
|
||||||
DicConsole.DebugWriteLine("ISO9660 plugin", "VDMagic = {0}", currentEncoding.GetString(vdMagic));
|
DicConsole.DebugWriteLine("ISO9660 plugin", "VDMagic = {0}", Encoding.ASCII.GetString(vdMagic));
|
||||||
DicConsole.DebugWriteLine("ISO9660 plugin", "HSMagic = {0}", currentEncoding.GetString(hsMagic));
|
DicConsole.DebugWriteLine("ISO9660 plugin", "HSMagic = {0}", Encoding.ASCII.GetString(hsMagic));
|
||||||
|
|
||||||
return currentEncoding.GetString(vdMagic) == ISO_MAGIC ||
|
return Encoding.ASCII.GetString(vdMagic) == ISO_MAGIC ||
|
||||||
currentEncoding.GetString(hsMagic) == HIGH_SIERRA_MAGIC ||
|
Encoding.ASCII.GetString(hsMagic) == HIGH_SIERRA_MAGIC ||
|
||||||
currentEncoding.GetString(vdMagic) == CDI_MAGIC;
|
Encoding.ASCII.GetString(vdMagic) == CDI_MAGIC;
|
||||||
}
|
}
|
||||||
|
|
||||||
public virtual void GetInformation(IMediaImage imagePlugin, Partition partition, out string information, Encoding encoding)
|
public virtual void GetInformation(IMediaImage imagePlugin, Partition partition, out string information, Encoding encoding)
|
||||||
|
|||||||
@@ -116,9 +116,9 @@ namespace DiscImageChef.Filesystems
|
|||||||
|
|
||||||
byte[] coherent_string = new byte[6];
|
byte[] coherent_string = new byte[6];
|
||||||
Array.Copy(sb_sector, 0x1E4, coherent_string, 0, 6); // Coherent UNIX s_fname location
|
Array.Copy(sb_sector, 0x1E4, coherent_string, 0, 6); // Coherent UNIX s_fname location
|
||||||
string s_fname = StringHandlers.CToString(coherent_string, currentEncoding);
|
string s_fname = StringHandlers.CToString(coherent_string);
|
||||||
Array.Copy(sb_sector, 0x1EA, coherent_string, 0, 6); // Coherent UNIX s_fpack location
|
Array.Copy(sb_sector, 0x1EA, coherent_string, 0, 6); // Coherent UNIX s_fpack location
|
||||||
string s_fpack = StringHandlers.CToString(coherent_string, currentEncoding);
|
string s_fpack = StringHandlers.CToString(coherent_string);
|
||||||
|
|
||||||
if(s_fname == COH_FNAME && s_fpack == COH_FPACK || s_fname == COH_XXXXX && s_fpack == COH_XXXXX ||
|
if(s_fname == COH_FNAME && s_fpack == COH_FPACK || s_fname == COH_XXXXX && s_fpack == COH_XXXXX ||
|
||||||
s_fname == COH_XXXXS && s_fpack == COH_XXXXN) return true;
|
s_fname == COH_XXXXS && s_fpack == COH_XXXXN) return true;
|
||||||
|
|||||||
Reference in New Issue
Block a user