summaryrefslogtreecommitdiffstats
path: root/Source/kwsys/Glob.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/kwsys/Glob.cxx')
-rw-r--r--Source/kwsys/Glob.cxx10
1 files changed, 7 insertions, 3 deletions
diff --git a/Source/kwsys/Glob.cxx b/Source/kwsys/Glob.cxx
index 21efca8..b34b473 100644
--- a/Source/kwsys/Glob.cxx
+++ b/Source/kwsys/Glob.cxx
@@ -84,7 +84,8 @@ kwsys_stl::vector<kwsys_stl::string>& Glob::GetFiles()
//----------------------------------------------------------------------------
kwsys_stl::string Glob::PatternToRegex(const kwsys_stl::string& pattern,
- bool require_whole_string)
+ bool require_whole_string,
+ bool preserve_case)
{
// Incrementally build the regular expression from the pattern.
kwsys_stl::string regex = require_whole_string? "^" : "";
@@ -195,10 +196,13 @@ kwsys_stl::string Glob::PatternToRegex(const kwsys_stl::string& pattern,
{
// On case-insensitive systems file names are converted to lower
// case before matching.
- ch = tolower(ch);
+ if(!preserve_case)
+ {
+ ch = tolower(ch);
+ }
}
#endif
-
+ (void)preserve_case;
// Store the character.
regex.append(1, static_cast<char>(ch));
}