Fixed desktop file scrubbing failing when user applications dir does not exist

This commit is contained in:
Kirottu
2023-04-30 10:13:07 +03:00
parent beaf2549ac
commit 042c5f0ad1

View File

@@ -174,7 +174,10 @@ pub fn scrubber(config: Config) -> Result<Vec<(DesktopEntry, u64)>, Box<dyn std:
} }
}; };
paths.extend(fs::read_dir(user_path)?); match fs::read_dir(&user_path) {
Ok(entries) => paths.extend(entries),
Err(why) => eprintln!("Error reading directory {}: {}", user_path, why),
}
Ok(paths Ok(paths
.iter() .iter()