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:
parent
8f7c4e1078
commit
9cc6f78540
1 changed files with 1 additions and 5 deletions
|
|
@ -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(|| {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue