mirror of
https://github.com/androidx/media.git
synced 2025-05-10 00:59:51 +08:00
Merge pull request #8459 from WonderzGmbH:fix/8253-cache-exception
PiperOrigin-RevId: 352450607
This commit is contained in:
commit
0c22810a7b
@ -837,7 +837,8 @@ public final class SimpleCache implements Cache {
|
||||
}
|
||||
|
||||
private static void createCacheDirectories(File cacheDir) throws CacheException {
|
||||
if (!cacheDir.mkdirs()) {
|
||||
// If mkdirs() returns false, double check that the directory doesn't exist before throwing.
|
||||
if (!cacheDir.mkdirs() && !cacheDir.isDirectory()) {
|
||||
String message = "Failed to create cache directory: " + cacheDir;
|
||||
Log.e(TAG, message);
|
||||
throw new CacheException(message);
|
||||
|
Loading…
x
Reference in New Issue
Block a user