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

fix(clean): Keep haze- prefix when comparing id

The cloud id has the prefix, so removing it breaks the comparison

Signed-off-by: Louis Chmn <louis@chmn.me>
This commit is contained in:
Louis Chmn 2026-08-08 20:56:43 +02:00
commit 9cc6f78540

View file

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