From 98ebac941a0d2c9ecb158244b9b3ad603ac7baab Mon Sep 17 00:00:00 2001 From: ptitSeb Date: Sat, 9 Apr 2016 14:15:33 +0200 Subject: [PATCH] Change CTString.Match to treat backslashes as slash (fixes Netrisca categories for new messages) --- Sources/Engine/Base/CTString.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) mode change 100644 => 100755 Sources/Engine/Base/CTString.cpp diff --git a/Sources/Engine/Base/CTString.cpp b/Sources/Engine/Base/CTString.cpp old mode 100644 new mode 100755 index 467bcfb..2caeeab --- a/Sources/Engine/Base/CTString.cpp +++ b/Sources/Engine/Base/CTString.cpp @@ -638,8 +638,10 @@ BOOL CTString::Matches(const char *strOther) const } else { q = 0; } - - if ((tolower(*m) != tolower(*n)) && ((*m != '?') || q)) { + + // also, '\\' in mask should match '/' in name, for unix compatibility + if (((tolower(*m) != tolower(*n)) && ((*m!='\\') && (*n!='/'))) + && ((*m != '?') || q)) { if (!wild) { return FALSE; }