Skip to content

Commit

Permalink
Use xdg instead of directories-next
Browse files Browse the repository at this point in the history
  • Loading branch information
smoelius committed Mar 22, 2024
1 parent 46a45a5 commit 7532983
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 74 deletions.
77 changes: 7 additions & 70 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ exclude = ["dep_tests/"]
[dependencies]
cargo_metadata = "0.15.0"
csv = "1.1"
directories-next = "2"
flate2 = "1"
humantime = "2"
humantime-serde = "1"
Expand All @@ -23,6 +22,7 @@ tar = "0.4.30"
indicatif = "0.17.0"
bpaf = { version = "0.9.1", features = ["derive", "dull-color"] }
anyhow = "1.0.28"
xdg = "2.5"

[dev-dependencies]
schemars = "0.8.3"
6 changes: 3 additions & 3 deletions src/crates_cache.rs
Original file line number Diff line number Diff line change
Expand Up @@ -113,9 +113,9 @@ impl CratesCache {
}

fn cache_dir() -> Option<PathBuf> {
let projects =
directories_next::ProjectDirs::from("", "rust-secure-code", "cargo-supply-chain")?;
Some(projects.cache_dir().to_owned())
xdg::BaseDirectories::with_prefix("cargo-supply-chain")
.ok()
.map(|base_directories| base_directories.get_cache_home())
}

/// Re-download the list from the data dumps.
Expand Down

0 comments on commit 7532983

Please sign in to comment.