Skip to content

Commit

Permalink
Merge pull request #94 from obi1kenobi/windows_path_handling
Browse files Browse the repository at this point in the history
Fixes #93
  • Loading branch information
kornelski authored Jan 29, 2023
2 parents 11fd701 + 4c62196 commit 4493ff3
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/bare_index.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ fn find_cargo_config() -> Option<PathBuf> {
if let Ok(current) = std::env::current_dir() {
let mut base = current;
loop {
let path = base.join(".cargo/config.toml");
let mut path = base.join(".cargo");
path.push("config.toml");
if path.exists() {
return Some(path)
}
Expand Down Expand Up @@ -83,7 +84,8 @@ impl Index {
let (dir_name, canonical_url) = url_to_local_dir(url)?;
let mut path = home::cargo_home().unwrap_or_default();

path.push("registry/index");
path.push("registry");
path.push("index");
path.push(dir_name);

Self::from_path_and_url(path, canonical_url)
Expand Down

0 comments on commit 4493ff3

Please sign in to comment.