Convert path from native seperators before using it in PathMatcher (#6926)
This commit is contained in:
parent
501ab0b6da
commit
9f9e0b9478
|
@ -17,6 +17,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "pathmatch.h"
|
#include "pathmatch.h"
|
||||||
|
#include "path.h"
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
|
|
||||||
|
@ -36,7 +37,7 @@ bool PathMatch::Match(const std::string &path) const
|
||||||
for (std::vector<std::string>::const_iterator iterMask = _masks.begin(); iterMask != _masks.end(); ++iterMask) {
|
for (std::vector<std::string>::const_iterator iterMask = _masks.begin(); iterMask != _masks.end(); ++iterMask) {
|
||||||
const std::string& mask(*iterMask);
|
const std::string& mask(*iterMask);
|
||||||
|
|
||||||
std::string findpath(path);
|
std::string findpath = Path::fromNativeSeparators(path);
|
||||||
if (!_caseSensitive)
|
if (!_caseSensitive)
|
||||||
std::transform(findpath.begin(), findpath.end(), findpath.begin(), ::tolower);
|
std::transform(findpath.begin(), findpath.end(), findpath.begin(), ::tolower);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue