@@ -352,27 +352,7 @@ fn execute_zip(
352352
353353 let mut writer = zip:: ZipWriter :: new ( file_util:: create_file ( zip_file_path) ?) ;
354354
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) {
376356 let entry = entry?;
377357 let relative_path = entry. path ( ) . strip_prefix ( & root_path) . unwrap ( ) ; // safe
378358
@@ -543,14 +523,12 @@ mod test {
543523 file_to ( & temp, "clone/part2/ex1/setup.py" , "" ) ;
544524 file_to ( & temp, "clone/part2/ex2/setup.py" , "" ) ;
545525 file_to ( & temp, "clone/part2/ex2/dir/subdir/file" , "" ) ;
546- file_to ( & temp, "clone/part2/ex2/dir/subdir/.hidden" , "" ) ;
547526 file_to ( & temp, "clone/part2/ex2/.tmcproject.yml" , "some: 'yaml'" ) ;
548527 file_to ( & temp, "stub/part1/ex1/setup.py" , "" ) ;
549528 file_to ( & temp, "stub/part1/ex2/setup.py" , "" ) ;
550529 file_to ( & temp, "stub/part2/ex1/setup.py" , "" ) ;
551530 file_to ( & temp, "stub/part2/ex2/setup.py" , "" ) ;
552531 file_to ( & temp, "stub/part2/ex2/dir/subdir/file" , "some file" ) ;
553- file_to ( & temp, "stub/part2/ex2/dir/subdir/.hidden" , "hidden file" ) ;
554532 file_to ( & temp, "stub/part2/ex2/.tmcproject.yml" , "some: 'yaml'" ) ;
555533
556534 let exercise_dirs = find_exercise_directories ( & temp. path ( ) . join ( "clone" ) )
@@ -587,16 +565,6 @@ mod test {
587565 for i in fz. file_names ( ) {
588566 log:: debug!( "{}" , i) ;
589567 }
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
600568 assert ! ( fz
601569 . by_name(
602570 & Path :: new( "part2" )
0 commit comments