@@ -352,27 +352,7 @@ fn execute_zip(
352
352
353
353
let mut writer = zip:: ZipWriter :: new ( file_util:: create_file ( zip_file_path) ?) ;
354
354
355
- // hidden files are filtered, so we handle .tmcproject.yml here
356
- let tmcproject_yml_path = exercise_root. join ( ".tmcproject.yml" ) ;
357
- if tmcproject_yml_path. exists ( ) {
358
- let tmcproject_yml = file_util:: read_file ( & tmcproject_yml_path) ?;
359
- let relative_path = tmcproject_yml_path. strip_prefix ( & root_path) . unwrap ( ) ; // safe
360
- writer. start_file (
361
- relative_path. to_string_lossy ( ) ,
362
- zip:: write:: FileOptions :: default ( ) ,
363
- ) ?;
364
- writer
365
- . write_all ( & tmcproject_yml)
366
- . map_err ( LangsError :: ZipWrite ) ?;
367
- }
368
- for entry in WalkDir :: new ( & exercise_root) . into_iter ( ) . filter_entry ( |e| {
369
- !e. file_name ( )
370
- . to_str ( )
371
- . map ( |e| e. starts_with ( '.' ) )
372
- . unwrap_or_default ( )
373
- } )
374
- // filter hidden
375
- {
355
+ for entry in WalkDir :: new ( & exercise_root) {
376
356
let entry = entry?;
377
357
let relative_path = entry. path ( ) . strip_prefix ( & root_path) . unwrap ( ) ; // safe
378
358
@@ -543,14 +523,12 @@ mod test {
543
523
file_to ( & temp, "clone/part2/ex1/setup.py" , "" ) ;
544
524
file_to ( & temp, "clone/part2/ex2/setup.py" , "" ) ;
545
525
file_to ( & temp, "clone/part2/ex2/dir/subdir/file" , "" ) ;
546
- file_to ( & temp, "clone/part2/ex2/dir/subdir/.hidden" , "" ) ;
547
526
file_to ( & temp, "clone/part2/ex2/.tmcproject.yml" , "some: 'yaml'" ) ;
548
527
file_to ( & temp, "stub/part1/ex1/setup.py" , "" ) ;
549
528
file_to ( & temp, "stub/part1/ex2/setup.py" , "" ) ;
550
529
file_to ( & temp, "stub/part2/ex1/setup.py" , "" ) ;
551
530
file_to ( & temp, "stub/part2/ex2/setup.py" , "" ) ;
552
531
file_to ( & temp, "stub/part2/ex2/dir/subdir/file" , "some file" ) ;
553
- file_to ( & temp, "stub/part2/ex2/dir/subdir/.hidden" , "hidden file" ) ;
554
532
file_to ( & temp, "stub/part2/ex2/.tmcproject.yml" , "some: 'yaml'" ) ;
555
533
556
534
let exercise_dirs = find_exercise_directories ( & temp. path ( ) . join ( "clone" ) )
@@ -587,16 +565,6 @@ mod test {
587
565
for i in fz. file_names ( ) {
588
566
log:: debug!( "{}" , i) ;
589
567
}
590
- assert ! ( fz
591
- . by_name(
592
- & Path :: new( "part2" )
593
- . join( "ex2" )
594
- . join( "dir" )
595
- . join( "subdir" )
596
- . join( ".hidden" )
597
- . to_string_lossy( )
598
- )
599
- . is_err( ) ) ; // hidden files filtered
600
568
assert ! ( fz
601
569
. by_name(
602
570
& Path :: new( "part2" )
0 commit comments