File tree Expand file tree Collapse file tree 2 files changed +9
-6
lines changed
tmc-langs-framework/src/io
tmc-langs-util/src/task_executor Expand file tree Collapse file tree 2 files changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -184,6 +184,7 @@ where
184184 for i in 0 ..archive. len ( ) {
185185 let mut file = archive. by_index ( i) ?;
186186 if filter ( & file) {
187+ log:: debug!( "skipped file {}" , file. name( ) ) ;
187188 continue ;
188189 }
189190
Original file line number Diff line number Diff line change @@ -165,13 +165,15 @@ pub fn prepare_submission(
165165
166166 fn useless_file_filter ( entry : & ZipFile ) -> bool {
167167 let files_to_filter = & [
168- ".DS_Store" ,
169- "desktop.ini" ,
170- "Thumbs.db" ,
171- ".directory" ,
172- "__MACOSX" ,
168+ std :: ffi :: OsStr :: new ( ".DS_Store" ) ,
169+ std :: ffi :: OsStr :: new ( "desktop.ini" ) ,
170+ std :: ffi :: OsStr :: new ( "Thumbs.db" ) ,
171+ std :: ffi :: OsStr :: new ( ".directory" ) ,
172+ std :: ffi :: OsStr :: new ( "__MACOSX" ) ,
173173 ] ;
174- files_to_filter. contains ( & entry. name ( ) )
174+ Path :: new ( entry. name ( ) )
175+ . components ( )
176+ . any ( |p| files_to_filter. contains ( & p. as_os_str ( ) ) )
175177 }
176178
177179 let temp = tempfile:: tempdir ( ) . map_err ( UtilError :: TempDir ) ?;
You can’t perform that action at this time.
0 commit comments