diff --git a/Cargo.lock b/Cargo.lock index e1e8ae9..d4dc7b6 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1323,7 +1323,7 @@ checksum = "a3f87b73ce11b1619a3c6332f45341e0047173771e8b8b73f87bfeefb7b56244" [[package]] name = "registry-backup" -version = "0.4.0-rc.1" +version = "0.4.0-rc.2" dependencies = [ "chrono", "clap", diff --git a/Cargo.toml b/Cargo.toml index 771108e..74c087e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "registry-backup" authors = ["Jonathan Strong "] -version = "0.4.0-rc.1" +version = "0.4.0-rc.2" edition = "2021" publish = ["shipyard-rs-public"] readme = "README.md" diff --git a/src/main.rs b/src/main.rs index 1a653cb..2eae4c9 100644 --- a/src/main.rs +++ b/src/main.rs @@ -617,7 +617,12 @@ async fn download_versions( // TODO actually parse and use the format let url = url::Url::parse(®istry_config.get_dl_url(&vers.name, &vers.vers, &vers.cksum))?; - let output_path = config.output.path.join(url.path()); + //let output_path = config.output.path.join(format!("{}/{}/download", vers.name, vers.vers)); + assert!( + url.path().starts_with('/'), + "sanity check in case there are unforseen exceptions to this" + ); + let output_path = config.output.path.join(&url.path()[1..]); if config.dry_run { debug!(%url, "skipping download (--dry-run mode)");