Skip to content

Commit

Permalink
windows pathes use backslashes
Browse files Browse the repository at this point in the history
  • Loading branch information
afujiwara-roblox committed Oct 10, 2023
1 parent b4dc4a0 commit 9c45ba2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/paths.rs
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ fn get_artiaa_path_based_on_os() -> ForemanResult<PathBuf> {
env_var: "%$LOCALAPPDATA%".to_string(),
})?;
Ok(PathBuf::from(format!(
"{}/ArtiAA/artiaa-tokens.json",
"{}\\ArtiAA\\artiaa-tokens.json",
localappdata
)))
}
Expand Down
7 changes: 4 additions & 3 deletions src/tool_provider/artifactory.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,11 @@ impl ToolProviderImpl for ArtifactoryProvider {
let mut releases: Vec<ArtifactoryRelease> = Vec::new();
let mut release_map: HashMap<&str, Vec<ArtifactoryAsset>> = HashMap::new();
for file in &response.files {
let uri = file.uri.split("/").collect::<Vec<&str>>();
let mut uri = file.uri.split("/");
// file.uri will look something like /<version>/<artifact-name>, so uri will be ["", <version>, <artifact-name]
let version = uri.get(1).unwrap();
let asset_name = uri.get(2).unwrap();
uri.next();
let version = uri.next().unwrap();
let asset_name = uri.next().unwrap();

let asset_url = format!("{}artifactory/{}/{}/{}", host, repo, version, asset_name);

Expand Down

0 comments on commit 9c45ba2

Please sign in to comment.