feat: less bad installations

This commit is contained in:
2025-02-23 20:54:47 +01:00
parent caead1e70f
commit 6236b8ef96
13 changed files with 124 additions and 58 deletions

View File

@ -23,6 +23,7 @@ impl DownloadHandler {
.ok_or_else(|| anyhow!("Attempted to download a package without remote data"))?
.clone();
if self.set.contains(zip_path.to_string_lossy().as_ref()) {
// Todo when there is a clear cache button, it should clear the set
Err(anyhow!("Already downloading"))
} else {
self.set.insert(zip_path.to_string_lossy().to_string());