BASE: Fix md5 commandline command on Windows

This commit is contained in:
Thierry Crozat 2022-04-21 17:47:34 +01:00 committed by Eugene Sandulenko
parent fe0723843b
commit cb8718dcdc

View File

@ -1695,7 +1695,13 @@ bool processSettings(Common::String &command, Common::StringMap &settings, Commo
return true;
} else if (command == "md5") {
Common::String filename = settings.getValOrDefault("md5-path", "scummvm");
Common::Path Filename(filename, '/');
// Assume '/' separator except on Windows if the path contain at least one `\`
char sep = '/';
#if WIN32
if (filename.contains('\\'))
sep = '\\';
#endif
Common::Path Filename(filename, sep);
Common::FSNode path(Filename);
int32 md5Length = 0;