From a7c860dc0b1c5cb4a5365d5a197a8198959293df Mon Sep 17 00:00:00 2001 From: Mohammad Banisaeid Date: Sun, 28 Jul 2024 11:02:33 +0200 Subject: [PATCH] Trim whitespace from sanitized directory names (#50) * Trim whitespace after sanitizing filenames * Bump version to 0.15.1 --- Cargo.lock | 2 +- Cargo.toml | 2 +- README.md | 2 +- src/util.rs | 15 +++++++++++---- 4 files changed, 14 insertions(+), 7 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 32205a7..bb6539c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -642,7 +642,7 @@ checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904" [[package]] name = "humble-cli" -version = "0.15.0" +version = "0.15.1" dependencies = [ "anyhow", "assert_cmd", diff --git a/Cargo.toml b/Cargo.toml index 54d6319..77b889f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "humble-cli" authors = ["Mohammad Banisaeid "] -version = "0.15.0" +version = "0.15.1" license = "MIT" description = "The missing CLI for downloading your Humble Bundle purchases" documentation = "https://github.com/smbl64/humble-cli" diff --git a/README.md b/README.md index d6bff6a..f67930d 100644 --- a/README.md +++ b/README.md @@ -37,7 +37,7 @@ After that you will have access to the following sub-commands: ``` $ humble-cli --help -humble-cli 0.15.0 +humble-cli 0.15.1 The missing Humble Bundle CLI USAGE: diff --git a/src/util.rs b/src/util.rs index d32f381..6a376f1 100644 --- a/src/util.rs +++ b/src/util.rs @@ -36,6 +36,8 @@ pub fn replace_invalid_chars_in_filename(input: &str) -> String { } }) .collect::() + .trim() + .to_string() } pub fn extract_filename_from_url(url: &str) -> Option { @@ -148,10 +150,15 @@ pub fn union_usize_ranges(values: &[&str], max_value: usize) -> Result