mirror of
https://github.com/samsonjs/media.git
synced 2026-04-08 11:45:51 +00:00
Double-check that the cache directory does not exist and is a directory
This commit is contained in:
parent
dde0b9b614
commit
c1501a3c6a
1 changed files with 1 additions and 1 deletions
|
|
@ -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…
Reference in a new issue