mirror of
https://github.com/androidx/media.git
synced 2025-05-21 23:56:32 +08:00
Double-check that the cache directory does not exist and is a directory
This commit is contained in:
parent
dde0b9b614
commit
c1501a3c6a
@ -837,7 +837,7 @@ public final class SimpleCache implements Cache {
|
||||
}
|
||||
|
||||
private static void createCacheDirectories(File cacheDir) throws CacheException {
|
||||
if (!cacheDir.mkdirs()) {
|
||||
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