duckduckgo / Android

DuckDuckGo Android App
https://play.google.com/store/apps/details?id=com.duckduckgo.mobile.android
Apache License 2.0
3.59k stars 873 forks source link

Catch exceptions on file deleter to prevent against app crashes #4527

Closed CDRussell closed 3 weeks ago

CDRussell commented 3 weeks ago

Task/Issue URL: https://app.asana.com/0/488551667048375/1207230693471364/f

Description

I've seen occasional crashes in the recursive file deleter which are possibly happening due to trying to recursively delete directories that are also being modified, triggered by events like having received a new favicon or trying to update a tab preview image.

In all likelihood the files will delete properly on next attempt, so adding a guard to catch exceptions to prevent app crashes.

Steps to test this PR

QA-optional

CDRussell commented 3 weeks ago

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @CDRussell and the rest of your teammates on Graphite Graphite