From 7c013bdb2cda08d687ebccc0f2f640c7f346e636 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Sun, 29 Jun 2025 00:36:19 +0200 Subject: [PATCH] BASE: Automatically detect Mac files This essentially obsoletes --md5mac. Now, with --md5 we still compute resource forks checksums if mac file is detected --- base/commandLine.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/base/commandLine.cpp b/base/commandLine.cpp index 121d4385478..a14faee4b81 100644 --- a/base/commandLine.cpp +++ b/base/commandLine.cpp @@ -2085,6 +2085,20 @@ bool processSettings(Common::String &command, Common::StringMap &settings, Commo steps = 1; } + // Prrobe mac file + if (command == "md5") { + Common::SearchSet dir; + Common::FSNode dirNode(Filename.getParent()); + dir.addDirectory(dirNode); + Common::Path fileName = Filename.getLastComponent(); + + Common::MacResManager macResMan; + if (macResMan.open(fileName, dir)) { + warning("Mac resources detected"); + command = "md5mac"; + } + } + for (uint i = 0; i < steps; i++) { if (command == "md5") { Common::FSNode path(Filename);