From 24672aa500fdb6d06d5d676ba3bab2d60fa51a19 Mon Sep 17 00:00:00 2001 From: mxve <68632137+mxve@users.noreply.github.com> Date: Thu, 2 Nov 2023 11:31:50 +0100 Subject: [PATCH] only show filename in pb --- src/http_async.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/http_async.rs b/src/http_async.rs index 63e30aa..510d039 100644 --- a/src/http_async.rs +++ b/src/http_async.rs @@ -31,7 +31,7 @@ pub async fn download_file( misc::cute_path(path), 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 = File::create(path).or(Err(format!("Failed to create file '{}'", path.display())))?;