forked from JakeWharton/DiskLruCache
-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Avoid IOExceptions in delete() when the cache dir is deleted externally.
listFiles() will return null if the directory has been deleted. This scenario isn’t totally far fetched because it’s fairly common for Android developers to place their disk caches in the Android application cache directory. The cache directory can be cleared at any time by the system, including while the app is open, which in turn can cause unexpected IOExceptions when delete() is called. See bumptech/glide#2465 for additional context.
- Loading branch information
Showing
2 changed files
with
40 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters