diff options
author | Bill Hoffman <bill.hoffman@kitware.com> | 2009-09-14 17:45:40 (GMT) |
---|---|---|
committer | Bill Hoffman <bill.hoffman@kitware.com> | 2009-09-14 17:45:40 (GMT) |
commit | c83591e81876505396a6a46cee39e32d5d289f4c (patch) | |
tree | 4e35b8696e04057c3e04f49511d4b9c130836eff /Source/kwsys/Glob.cxx | |
parent | 14715ce8137ffdcefbb9b23418c19aa5a1ed0407 (diff) | |
download | CMake-c83591e81876505396a6a46cee39e32d5d289f4c.zip CMake-c83591e81876505396a6a46cee39e32d5d289f4c.tar.gz CMake-c83591e81876505396a6a46cee39e32d5d289f4c.tar.bz2 |
Fix for Bug #9190, -U did not work on case insensitive file systems because of call to glob convert to regex that expected to work with files.
Diffstat (limited to 'Source/kwsys/Glob.cxx')
-rw-r--r-- | Source/kwsys/Glob.cxx | 10 |
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)); } |