Skip to content

Commit d3700cc

Browse files
Fix Windows by using dunce
1 parent fdcd3d5 commit d3700cc

File tree

5 files changed

+10
-52
lines changed

5 files changed

+10
-52
lines changed

Cargo.lock

Lines changed: 5 additions & 47 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

crates/ignore/Cargo.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,12 @@ bench = false
2020

2121
[dependencies]
2222
crossbeam-deque = "0.8.3"
23-
globset = { path = "../globset" }
23+
globset = "0.4.16"
2424
log = "0.4.20"
2525
memchr = "2.6.3"
2626
same-file = "1.0.6"
2727
walkdir = "2.4.0"
28+
dunce = "1.0.5"
2829

2930
[dependencies.regex-automata]
3031
version = "0.4.0"

crates/ignore/src/dir.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,8 @@ impl Ignore {
176176
if !self.is_root() {
177177
panic!("Ignore::add_parents called on non-root matcher");
178178
}
179-
let absolute_base = match path.as_ref().canonicalize() {
179+
// CHANGED: Use `dunce::canonicalize` as we use it everywhere else.
180+
let absolute_base = match dunce::canonicalize(path.as_ref()) {
180181
Ok(path) => Arc::new(path),
181182
Err(_) => {
182183
// There's not much we can do here, so just return our

crates/ignore/src/gitignore.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,6 @@ impl Gitignore {
184184
/// gitignore) is stripped. If there is no common suffix/prefix overlap,
185185
/// then `path` is assumed to be relative to this matcher.
186186
pub fn matched<P: AsRef<Path>>(&self, path: P, is_dir: bool) -> Match<&Glob> {
187-
dbg!(path.as_ref(), &self.globs);
188187
if self.is_empty() {
189188
return Match::None;
190189
}
@@ -221,6 +220,7 @@ impl Gitignore {
221220
return Match::None;
222221
}
223222
let mut path = self.strip(path.as_ref());
223+
dbg!("SECOND", &path);
224224
assert!(!path.has_root(), "path is expected to be under the root");
225225

226226
match self.matched_stripped(path, is_dir) {

crates/oxide/src/scanner/mod.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,8 +100,6 @@ impl Scanner {
100100
pub fn new(sources: Vec<PublicSourceEntry>) -> Self {
101101
let sources = Sources::new(public_source_entries_to_private_source_entries(sources));
102102

103-
dbg!(&sources);
104-
105103
Self {
106104
sources: sources.clone(),
107105
walker: create_walker(sources),

0 commit comments

Comments
 (0)