Skip to content

Commit

Permalink
strip trailing on output dir
Browse files Browse the repository at this point in the history
  • Loading branch information
agourlay committed Apr 6, 2024
1 parent f1fa14a commit 2727611
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/main.rs
Expand Up @@ -56,7 +56,11 @@ async fn main_result() -> Result<(), DlmError> {
let c_ref = &client;
let client_no_redirect = make_client(&user_agent, &proxy, false, connection_timeout_secs)?;
let c_no_redirect_ref = &client_no_redirect;
let od_ref = &output_dir;
// trim trailing slash if any
let od_ref = &output_dir
.strip_suffix('/')
.unwrap_or(&output_dir)
.to_string();

// setup progress bar manager
let pbm = ProgressBarManager::init(max_concurrent_downloads, nb_of_lines as u64).await;
Expand Down

0 comments on commit 2727611

Please sign in to comment.