aboutsummaryrefslogtreecommitdiff
path: root/base/src/lib.rs
diff options
context:
space:
mode:
Diffstat (limited to 'base/src/lib.rs')
-rw-r--r--base/src/lib.rs5
1 files changed, 2 insertions, 3 deletions
diff --git a/base/src/lib.rs b/base/src/lib.rs
index df80036..46ab576 100644
--- a/base/src/lib.rs
+++ b/base/src/lib.rs
@@ -20,7 +20,7 @@ pub static CONF: LazyLock<GlobalConfig> = LazyLock::new(|| {
.unwrap()
});
-pub fn cache_file(seed: &[&str]) -> PathBuf {
+pub fn cache_file(seed: &[&str]) -> AssetLocation {
use sha2::Digest;
let mut d = sha2::Sha512::new();
for s in seed {
@@ -30,8 +30,7 @@ pub fn cache_file(seed: &[&str]) -> PathBuf {
let d = d.finalize();
let fname = base64::engine::general_purpose::URL_SAFE.encode(d);
let fname = &fname[..22]; // about 128 bits
- let path = CONF.cache_path.join(fname);
- path
+ AssetLocation::Cache(fname.into())
}
pub trait AssetLocationExt {