1
0
Fork 0
mirror of https://codeberg.org/icewind/haze.git synced 2026-10-01 08:44:09 +02:00

Merge pull request 'fix(clean): Keep haze- prefix when comparing id' (#31) from artonge/haze:artonge/fix/clean_matching into main

Reviewed-on: https://codeberg.org/icewind/haze/pulls/31
This commit is contained in:
Robin Appelman 2026-08-10 13:50:09 +02:00
commit 8ce4ccbf63

View file

@ -82,11 +82,7 @@ async fn main() -> Result<ExitCode> {
for cache_dir in config.work_dir.read_dir().into_diagnostic()? { for cache_dir in config.work_dir.read_dir().into_diagnostic()? {
let cache_dir = cache_dir.into_diagnostic()?; let cache_dir = cache_dir.into_diagnostic()?;
if let Some(id) = cache_dir if let Some(id) = cache_dir.file_name().to_str() {
.file_name()
.to_str()
.and_then(|name| name.strip_prefix("haze-"))
{
if !retain.iter().any(|cloud| cloud.id == id) { if !retain.iter().any(|cloud| cloud.id == id) {
let path = cache_dir.path(); let path = cache_dir.path();
remove_dir_all(&path).into_diagnostic().wrap_err_with(|| { remove_dir_all(&path).into_diagnostic().wrap_err_with(|| {