mirror of
https://github.com/samsonjs/media.git
synced 2026-04-27 15:07:40 +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 {
|
private static void createCacheDirectories(File cacheDir) throws CacheException {
|
||||||
if (!cacheDir.mkdirs()) {
|
if (!cacheDir.mkdirs() && !cacheDir.isDirectory()) {
|
||||||
String message = "Failed to create cache directory: " + cacheDir;
|
String message = "Failed to create cache directory: " + cacheDir;
|
||||||
Log.e(TAG, message);
|
Log.e(TAG, message);
|
||||||
throw new CacheException(message);
|
throw new CacheException(message);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue