diff options
author | Xidorn Quan <me@upsuper.org> | 2016-07-15 09:10:23 +1000 |
---|---|---|
committer | Xidorn Quan <me@upsuper.org> | 2016-07-15 09:10:23 +1000 |
commit | db6073ec6020f5d457b7e4b2155c7567a5260c9a (patch) | |
tree | 2f77faadbd55e5875ddfd6b9d2df9847f2997826 | |
parent | 9eceb7fdb26da909f019a27b3d892a3929b184c8 (diff) |
Normalize header path to use unix sep
Otherwise it would be hard to write uniform blacklist header list
across platforms, especially given that on Windows, some part of
path could be using '/' while others use '\'.
-rw-r--r-- | src/parser.rs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/parser.rs b/src/parser.rs index 12047213..71a6dff9 100644 --- a/src/parser.rs +++ b/src/parser.rs @@ -78,6 +78,7 @@ fn match_pattern(ctx: &mut ClangParserCtx, cursor: &Cursor) -> bool { return true; } + let name = name.replace("\\", "/"); ctx.options.match_pat.iter().any(|pat| name.contains(pat)) } |