Permalink
Browse files
try to fix path problems on windows (used / instead of \ )
- Loading branch information...
Showing
with
11 additions
and
7 deletions.
-
+11
−7
src/library.rs
|
|
@@ -72,15 +72,19 @@ impl CargoCachePaths { |
|
|
|
); |
|
|
|
return Err((ErrorKind::CargoHomeNotDirectory, msg)); |
|
|
|
} |
|
|
|
|
|
|
|
// path delimiter |
|
|
|
let pd = if cfg!(windows) { "\\" } else { "/" }; |
|
|
|
|
|
|
|
// get the paths to the relevant directories |
|
|
|
let cargo_home = cargo_home_path; |
|
|
|
let bin = cargo_home.join("bin/"); |
|
|
|
let registry = cargo_home.join("registry/"); |
|
|
|
let registry_index = registry.join("index/"); |
|
|
|
let reg_cache = registry.join("cache/"); |
|
|
|
let reg_src = registry.join("src/"); |
|
|
|
let git_repos_bare = cargo_home.join("git/db/"); |
|
|
|
let git_checkouts = cargo_home.join("git/checkouts/"); |
|
|
|
let bin = cargo_home.join("bin").join(pd); |
|
|
|
let registry = cargo_home.join("registry").join(pd); |
|
|
|
let registry_index = registry.join("index").join(pd); |
|
|
|
let reg_cache = registry.join("cache").join(pd); |
|
|
|
let reg_src = registry.join("src").join(pd); |
|
|
|
let git_repos_bare = cargo_home.join("git").join(pd).join("db").join(pd); |
|
|
|
let git_checkouts = cargo_home.join("git").join(pd).join("checkouts").join(pd); |
|
|
|
|
|
|
|
Ok(Self { |
|
|
|
cargo_home, |
|
|
|
0 comments on commit
eb379bf