File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -355,6 +355,10 @@ impl<'cfg> PathSource<'cfg> {
355355 if !is_root && fs:: metadata ( & path. join ( "Cargo.toml" ) ) . is_ok ( ) {
356356 return Ok ( ( ) ) ;
357357 }
358+ // Skip dotfile directories.
359+ if path. file_name ( ) . and_then ( |s| s. to_str ( ) ) . map ( |s| s. starts_with ( '.' ) ) == Some ( true ) {
360+ return Ok ( ( ) ) ;
361+ }
358362
359363 // For package integration tests, we need to sort the paths in a deterministic order to
360364 // be able to match stdout warnings in the same order.
@@ -368,10 +372,6 @@ impl<'cfg> PathSource<'cfg> {
368372 entries. sort_unstable_by ( |a, b| a. as_os_str ( ) . cmp ( b. as_os_str ( ) ) ) ;
369373 for path in entries {
370374 let name = path. file_name ( ) . and_then ( |s| s. to_str ( ) ) ;
371- // Skip dotfile directories.
372- if name. map ( |s| s. starts_with ( '.' ) ) == Some ( true ) {
373- continue ;
374- }
375375 if is_root && name == Some ( "target" ) {
376376 // Skip Cargo artifacts.
377377 continue ;
You can’t perform that action at this time.
0 commit comments