File tree Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -176,7 +176,6 @@ async fn extract_rename(
176176async fn extract_archive (
177177 chal : & ChallengeConfig ,
178178 container : & docker:: ContainerInfo ,
179- // files: &Vec<PathBuf>,
180179 files : & [ PathBuf ] ,
181180 archive_name : & Path ,
182181) -> Result < Vec < PathBuf > > {
@@ -203,7 +202,7 @@ async fn extract_archive(
203202 // archive_name already has the chal dir prepended
204203 zip_files ( archive_name, & copied_files) ?;
205204
206- Ok ( vec ! [ chal . directory . join ( archive_name ) ] )
205+ Ok ( vec ! [ archive_name . to_path_buf ( ) ] )
207206}
208207
209208/// Add multiple local `files` to a zipfile at `zip_name`
Original file line number Diff line number Diff line change @@ -138,7 +138,7 @@ async fn build_challenge(
138138
139139 // extract each challenge provide entry
140140 // this handles both local files and from build containers
141- let extracted_files = chal
141+ built . assets = chal
142142 . provide
143143 . iter ( )
144144 . map ( |p| async {
@@ -152,7 +152,11 @@ async fn build_challenge(
152152 } )
153153 } )
154154 . try_join_all ( )
155- . await ?;
155+ . await ?
156+ // flatten to single vec of all paths
157+ . into_iter ( )
158+ . flatten ( )
159+ . collect_vec ( ) ;
156160
157161 info ! ( "extracted artifacts: {:?}" , built. assets) ;
158162 }
You can’t perform that action at this time.
0 commit comments