summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXidorn Quan <me@upsuper.org>2016-07-15 09:10:23 +1000
committerXidorn Quan <me@upsuper.org>2016-07-15 09:10:23 +1000
commitdb6073ec6020f5d457b7e4b2155c7567a5260c9a (patch)
tree2f77faadbd55e5875ddfd6b9d2df9847f2997826
parent9eceb7fdb26da909f019a27b3d892a3929b184c8 (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.rs1
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))
}