diff --git a/AppCommon/FileIdentifier.cs b/AppCommon/FileIdentifier.cs index ee89cc1..62a94b4 100644 --- a/AppCommon/FileIdentifier.cs +++ b/AppCommon/FileIdentifier.cs @@ -123,6 +123,7 @@ public static bool HasDiskImageAttribs(IFileEntry entry, string gzipName, out st if (!looksGood && !hasProType && entry.HasProDOSTypes) { proType = entry.FileType; proAux = entry.AuxType; + hasProType = true; } if (!looksGood) { if (proType == FileAttribs.FILE_TYPE_LBR && @@ -145,9 +146,16 @@ public static bool HasDiskImageAttribs(IFileEntry entry, string gzipName, out st // If it's BIN or NON, or totally typeless (ZIP), test the filename extension. if ((!hasProType /*&& !entry.HasHFSTypes*/) || (hasProType && (proType == FileAttribs.FILE_TYPE_NON || - proType == FileAttribs.FILE_TYPE_BIN))) { + proType == FileAttribs.FILE_TYPE_BIN || + proType == FileAttribs.FILE_TYPE_F1))) { if (ExtInSet(ext, sDiskExts)) { looksGood = true; + } else if (entry.DataLength == 140 * 1024) { + // File is exactly the size of a 140KB floppy disk image. It didn't have + // a recognized disk image filename extension, so let's assume it's in + // DOS sector order. + ext = ".do"; + looksGood = true; } } } diff --git a/DiskArc/DAExtensions.cs b/DiskArc/DAExtensions.cs index a615044..343dbc8 100644 --- a/DiskArc/DAExtensions.cs +++ b/DiskArc/DAExtensions.cs @@ -747,7 +747,7 @@ public static bool IsMacZipHeader(this IFileEntry entry) { return false; } - #endregion + #endregion IFileEntry #region IMetadata @@ -768,6 +768,6 @@ public static bool IsMacZipHeader(this IFileEntry entry) { return null; } - #endregion + #endregion IMetadata } } diff --git a/DiskArc/FileAttribs.cs b/DiskArc/FileAttribs.cs index 1777330..f85814b 100644 --- a/DiskArc/FileAttribs.cs +++ b/DiskArc/FileAttribs.cs @@ -69,6 +69,7 @@ public sealed class FileAttribs { public const int FILE_TYPE_SND = 0xd8; public const int FILE_TYPE_LBR = 0xe0; public const int FILE_TYPE_CMD = 0xf0; + public const int FILE_TYPE_F1 = 0xf1; public const int FILE_TYPE_F2 = 0xf2; public const int FILE_TYPE_F3 = 0xf3; public const int FILE_TYPE_F4 = 0xf4;