File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -456,10 +456,11 @@ impl VideoCommandBuilder {
456456 tokio:: fs:: create_dir ( & extract_path) ;
457457 tools:: compression:: unpack_tar_xz ( & path, PathBuf :: from ( & extract_path) ) . await ?;
458458 let root_folder = tokio:: fs:: read_dir ( & extract_path) . await ?. next_entry ( ) . await ?. ok_or :: < RsError > ( "Unable to decompress" . into ( ) ) ?;
459- root_folder. push ( "bin" ) ;
460- let mut path_ffmpeg = root_folder. path ( ) ;
459+ let mut bin_folder = root_folder. path ( ) ;
460+ bin_folder. push ( "bin" ) ;
461+ let mut path_ffmpeg = bin_folder. path ( ) ;
461462 path_ffmpeg. push ( "ffmpeg" ) ;
462- let mut path_ffprobe = root_folder . path ( ) ;
463+ let mut path_ffprobe = bin_folder . path ( ) ;
463464 path_ffprobe. push ( "ffprobe" ) ;
464465 println ! ( "full path: {:?}" , path_ffmpeg) ;
465466
@@ -483,6 +484,9 @@ impl VideoCommandBuilder {
483484 // Apply the new permissions
484485 std:: fs:: set_permissions ( & ffprobe_target, perms) ?;
485486
487+ tokio:: fs:: remove_file ( path) . await ;
488+ tokio:: fs:: remove_dir_all ( root_folder) . await ;
489+
486490 Ok ( ( ) )
487491 }
488492
You can’t perform that action at this time.
0 commit comments