only show filename in pb

This commit is contained in:
mxve 2023-11-02 11:31:50 +01:00
parent 806118862f
commit 9a6b7b531a

View File

@ -31,7 +31,7 @@ pub async fn download_file(
misc::cute_path(path), misc::cute_path(path),
misc::human_readable_bytes(total_size) misc::human_readable_bytes(total_size)
)); ));
pb.set_message(misc::cute_path(path)); pb.set_message(format!("{}", path.file_name().unwrap().to_str().unwrap()));
let mut file = let mut file =
File::create(path).or(Err(format!("Failed to create file '{}'", path.display())))?; File::create(path).or(Err(format!("Failed to create file '{}'", path.display())))?;