mirror of
https://github.com/samsonjs/media.git
synced 2026-03-26 09:35:47 +00:00
Merge pull request #8459 from WonderzGmbH:fix/8253-cache-exception
PiperOrigin-RevId: 352450607
This commit is contained in:
commit
0c22810a7b
1 changed files with 2 additions and 1 deletions
|
|
@ -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…
Reference in a new issue