| author | |
| committer | |
| log | 7069fb2abee3f488a947853152d7830c53c650f0 |
| tree | e9712278c12b78d6d795ecea4ef5f4b2711fc2bf |
| parent | 1277556627697178524b047acc28e6d3694f31e9 |
| signature | Signed by SSH key SHA256:52mNGHRsVFBDED9IAX5pe+LRWUefqTbxEReunq21QvU |
Uninstall deleted ~/.local/bin/snowbound but left the .snowbound.update folder
an update check had downloaded next to it.
Assisted-by: claude-opus-5.52 files changed, 7 insertions(+), 1 deletions(-)
crates/snowbound/src/desktop_linux.rs+6| ... | @@ -412,6 +412,12 @@ pub fn uninstall() { | ... | @@ -412,6 +412,12 @@ pub fn uninstall() { |
| 412 | } | 412 | } |
| 413 | let mut failed = None; | 413 | let mut failed = None; |
| 414 | let icons = SIZES.map(|side| theme_icon(&data, side)); | 414 | let icons = SIZES.map(|side| theme_icon(&data, side)); |
| 415 | if let Some(staged) = crate::update::staging(&binary) | ||
| 416 | && let Err(error) = fs::remove_dir_all(staged) | ||
| 417 | && error.kind() != io::ErrorKind::NotFound | ||
| 418 | { | ||
| 419 | failed.get_or_insert(error); | ||
| 420 | } | ||
| 415 | for path in [entry(&data), mime_types(&data), binary] | 421 | for path in [entry(&data), mime_types(&data), binary] |
| 416 | .iter() | 422 | .iter() |
| 417 | .chain(&icons) | 423 | .chain(&icons) |
crates/snowbound/src/update.rs+1-1| ... | @@ -294,7 +294,7 @@ fn install() -> Option<PathBuf> { | ... | @@ -294,7 +294,7 @@ fn install() -> Option<PathBuf> { |
| 294 | } | 294 | } |
| 295 | 295 | ||
| 296 | /// The folder an update to `install` unpacks into, beside it so the swap is a rename. | 296 | /// The folder an update to `install` unpacks into, beside it so the swap is a rename. |
| 297 | fn staging(install: &Path) -> Option<PathBuf> { | 297 | pub fn staging(install: &Path) -> Option<PathBuf> { |
| 298 | let name = install.file_name()?.to_string_lossy(); | 298 | let name = install.file_name()?.to_string_lossy(); |
| 299 | Some(install.with_file_name(format!(".{name}.update"))) | 299 | Some(install.with_file_name(format!(".{name}.update"))) |
| 300 | } | 300 | } |