Skip to content

Commit 58d3f8e

Browse files
committed
backslash
1 parent 254b708 commit 58d3f8e

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

CHANGELOG-rust.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ This changelog tracks the Rust `svdtools` project. See
55

66
## [Unreleased]
77

8+
* Fix escape special characters on Windows
9+
810
## [v0.3.8] 2023-12-23
911

1012
* Fix #176 in `collect_in_cluster`

src/patch/mod.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,11 @@ fn matchname(name: &str, spec: &str) -> bool {
248248
}
249249

250250
fn newglob(spec: &str) -> globset::GlobMatcher {
251-
globset::Glob::new(spec).unwrap().compile_matcher()
251+
globset::GlobBuilder::new(spec)
252+
.backslash_escape(true)
253+
.build()
254+
.unwrap()
255+
.compile_matcher()
252256
}
253257

254258
/// If a name matches a specification, return the first sub-specification that it matches

0 commit comments

Comments
 (0)