diff options
Diffstat (limited to 'gui')
-rw-r--r-- | gui/ThemeEngine.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/gui/ThemeEngine.cpp b/gui/ThemeEngine.cpp index 7fe40542c2..098cb8e0ac 100644 --- a/gui/ThemeEngine.cpp +++ b/gui/ThemeEngine.cpp @@ -391,7 +391,7 @@ bool ThemeEngine::init() { Common::FSNode node(_themeFile); if (node.isDirectory()) { _themeArchive = new Common::FSDirectory(node); - } else if (_themeFile.hasSuffix(".zip")) { + } else if (_themeFile.matchString("*.zip", true)) { // TODO: Also use "node" directly? // Look for the zip file via SearchMan Common::ArchiveMemberPtr member = SearchMan.getMember(_themeFile); @@ -1535,7 +1535,7 @@ bool ThemeEngine::themeConfigUsable(const Common::ArchiveMember &member, Common: Common::File stream; bool foundHeader = false; - if (member.getName().hasSuffix(".zip")) { + if (member.getName().matchString("*.zip", true)) { Common::Archive *zipArchive = Common::makeZipArchive(member.createReadStream()); if (zipArchive && zipArchive->hasFile("THEMERC")) { @@ -1557,7 +1557,7 @@ bool ThemeEngine::themeConfigUsable(const Common::FSNode &node, Common::String & Common::File stream; bool foundHeader = false; - if (node.getName().hasSuffix(".zip") && !node.isDirectory()) { + if (node.getName().matchString("*.zip", true) && !node.isDirectory()) { Common::Archive *zipArchive = Common::makeZipArchive(node); if (zipArchive && zipArchive->hasFile("THEMERC")) { // Open THEMERC from the ZIP file. @@ -1643,7 +1643,7 @@ void ThemeEngine::listUsableThemes(Common::Archive &archive, Common::List<ThemeD // If the name of the node object also contains // the ".zip" suffix, we will strip it. - if (td.id.hasSuffix(".zip")) { + if (td.id.matchString("*.zip", true)) { for (int j = 0; j < 4; ++j) td.id.deleteLastChar(); } @@ -1680,7 +1680,7 @@ void ThemeEngine::listUsableThemes(const Common::FSNode &node, Common::List<Them for (Common::FSList::iterator i = fileList.begin(); i != fileList.end(); ++i) { // We will only process zip files for now - if (!i->getPath().hasSuffix(".zip")) + if (!i->getPath().matchString("*.zip", true)) continue; td.name.clear(); @@ -1690,7 +1690,7 @@ void ThemeEngine::listUsableThemes(const Common::FSNode &node, Common::List<Them // If the name of the node object also contains // the ".zip" suffix, we will strip it. - if (td.id.hasSuffix(".zip")) { + if (td.id.matchString("*.zip", true)) { for (int j = 0; j < 4; ++j) td.id.deleteLastChar(); } @@ -1727,7 +1727,7 @@ Common::String ThemeEngine::getThemeFile(const Common::String &id) { Common::FSNode node(id); // If the given id is a full path we'll just use it - if (node.exists() && (node.isDirectory() || node.getName().hasSuffix(".zip"))) + if (node.exists() && (node.isDirectory() || node.getName().matchString("*.zip", true))) return id; // FIXME: @@ -1758,7 +1758,7 @@ Common::String ThemeEngine::getThemeId(const Common::String &filename) { if (!node.exists()) return "builtin"; - if (node.getName().hasSuffix(".zip")) { + if (node.getName().matchString("*.zip", true)) { Common::String id = node.getName(); for (int i = 0; i < 4; ++i) |