Skip to content

Commit 5b4c530

Browse files
committed
Also use the cached filename for require_literal_leading_dot check
1 parent 79928b0 commit 5b4c530

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/lib.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -965,9 +965,7 @@ fn fill_todo(
965965
match dirs {
966966
Ok(mut children) => {
967967
if options.require_literal_leading_dot {
968-
children.retain(|x| {
969-
!x.0.file_name().unwrap().to_str().unwrap().starts_with('.')
970-
});
968+
children.retain(|x| !x.1.to_str().unwrap().starts_with('.'));
971969
}
972970
children.sort_by(|p1, p2| p2.1.cmp(&p1.1));
973971
todo.extend(children.into_iter().map(|x| Ok((x.0, idx))));

0 commit comments

Comments
 (0)