1
Fork 0
mirror of https://github.com/thegeneralist01/archivr synced 2026-05-30 08:36:47 +02:00

refactor: simplify archive source parsing

This commit is contained in:
TheGeneralist 2026-04-02 14:05:01 +02:00
parent cb0abbb760
commit 514a5e99c7
Signed by: thegeneralist01
SSH key fingerprint: SHA256:pp9qddbCNmVNoSjevdvQvM5z0DHN7LTa8qBMbcMq/R4
4 changed files with 205 additions and 283 deletions

View file

@ -277,7 +277,10 @@ fn archive_asset_reference(
}
let relative_path = local::archive_staged_file(&absolute_path, store_path)?;
let relative_path = relative_path.to_string_lossy().replace('\\', "/");
let relative_path = relative_path
.relative_path()
.to_string_lossy()
.replace('\\', "/");
archived_assets.insert(key, relative_path.clone());
Ok(relative_path)