ruget icon indicating copy to clipboard operation
ruget copied to clipboard

Single download fails on URLs ending with /

Open jayvdb opened this issue 1 year ago • 0 comments

Doing ruget http://localhost/foo/ results

--- Single download mode ---
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Os { code: 2, kind: NotFound, message: "No such file or directory" }', src/lib/downloader/single.rs:35:47
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Adding a dbg! shows why

[src/lib/downloader/single.rs:20] url_parse.clone() = [
    "http:",
    "",
    "localhost",
    "foo",
    "",
]

jayvdb avatar Aug 27 '23 02:08 jayvdb