diff --git a/src/flows/repo.rs b/src/flows/repo.rs index 8c9a71d..dd89331 100644 --- a/src/flows/repo.rs +++ b/src/flows/repo.rs @@ -12,7 +12,10 @@ use walkdir::WalkDir; pub fn browse() -> Result<(), Error> { let repo_path_str = format!("{}/featured", filesystem::tmp_path_str()?); - filesystem::remove_dir(&repo_path_str)?; + // The dir might not exist which would throw an error. But here we don't care about that + // since our purpose is to make space for a new directory. Potential other errors + // (e.g due to lack of permission) will cause an error during dir creation. + let _ = filesystem::remove_dir(&repo_path_str); filesystem::create_dir(&repo_path_str)?; let repo_url = "https://github.com/denisidoro/cheats";