Skip to content

Commit 1eab812

Browse files
authored
Fix glob! input_file on Windows (#371)
1 parent a23d982 commit 1eab812

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/runtime.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -315,9 +315,10 @@ impl<'a> SnapshotAssertionContext<'a> {
315315
.canonicalize()
316316
.ok()
317317
.and_then(|s| {
318-
s.strip_prefix(self.cargo_workspace.as_path())
318+
self.cargo_workspace
319+
.canonicalize()
319320
.ok()
320-
.map(|x| x.to_path_buf())
321+
.and_then(|cw| s.strip_prefix(cw).ok().map(|x| x.to_path_buf()))
321322
})
322323
}
323324

0 commit comments

Comments
 (0)