summaryrefslogtreecommitdiffstats
path: root/Source/cmSystemTools.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmSystemTools.cxx')
-rw-r--r--Source/cmSystemTools.cxx3
1 files changed, 1 insertions, 2 deletions
diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx
index 81f76ca..d290c0c 100644
--- a/Source/cmSystemTools.cxx
+++ b/Source/cmSystemTools.cxx
@@ -1065,8 +1065,7 @@ bool cmSystemTools::SimpleGlob(const std::string& glob,
if (type < 0 && !cmSystemTools::FileIsDirectory(fname)) {
continue;
}
- if (sfname.size() >= ppath.size() &&
- sfname.substr(0, ppath.size()) == ppath) {
+ if (cmHasPrefix(sfname, ppath)) {
files.push_back(fname);
res = true;
}