Commit c1501a3c by Artem Chepurnoy

Double-check that the cache directory does not exist and is a directory

parent dde0b9b6
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment