File tree Expand file tree Collapse file tree 1 file changed +7
-6
lines changed
Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -405,12 +405,13 @@ impl Component for Efi {
405405 let payload_src_dir = ver_dir. sub_dir ( "EFI" ) ?;
406406 let firmware_filetree =
407407 crate :: filetree:: FileTree :: new_from_dir ( & payload_src_dir) ?;
408- for file_path_str in firmware_filetree. children . keys ( ) {
409- let file_path = Path :: new ( file_path_str) ;
410- if file_path != meta_path {
411- ver_dir. copy_file_at ( file_path, destd, file_path) ?;
412- }
413- }
408+ // copy all by applying a diff with a empty filetree
409+ let empty_filetree = filetree:: FileTree {
410+ children : Default :: default ( ) ,
411+ } ;
412+ let diff = empty_filetree. diff ( & firmware_filetree) ?;
413+ filetree:: apply_diff ( & payload_src_dir, destd, & diff, None )
414+ . context ( "applying supplemental firmware" ) ?;
414415
415416 found_firmware. insert (
416417 pkg_name. clone ( ) ,
You can’t perform that action at this time.
0 commit comments