Skip to content

Commit

Permalink
fix: Improve error handling for deleting folders
Browse files Browse the repository at this point in the history
  • Loading branch information
pacholoamit committed Jul 7, 2024
1 parent a7530d1 commit a6a5b1a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src-tauri/src/commands.rs
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,11 @@ pub fn delete_folder(path: String) -> Result<(), String> {
.arg("-rf")
.arg(&path)
.spawn()
.unwrap();

match child {
Ok(_) => Ok(()),
Err(e) => Err(e.to_string()),
}
}
#[cfg(target_os = "windows")]
{
Expand Down

0 comments on commit a6a5b1a

Please sign in to comment.