From 7b0b574a74d1f6e2b9de317eaf92905fcc7d589b Mon Sep 17 00:00:00 2001 From: nostra13 Date: Sat, 9 Feb 2013 12:45:32 +0300 Subject: [PATCH] Issue #168 - Images aren't loaded after "Clear Cache" in app info --- .../universalimageloader/core/LoadAndDisplayImageTask.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/library/src/com/nostra13/universalimageloader/core/LoadAndDisplayImageTask.java b/library/src/com/nostra13/universalimageloader/core/LoadAndDisplayImageTask.java index 9e9611f67..be9e492a1 100644 --- a/library/src/com/nostra13/universalimageloader/core/LoadAndDisplayImageTask.java +++ b/library/src/com/nostra13/universalimageloader/core/LoadAndDisplayImageTask.java @@ -284,6 +284,11 @@ private Bitmap decodeWithOOMHandling(URI imageUri) throws IOException { } private void saveImageOnDisc(File targetFile) throws IOException, URISyntaxException { + File cacheDir = targetFile.getParentFile(); + if (!cacheDir.exists()) { + cacheDir.mkdirs(); + } + int width = configuration.maxImageWidthForDiscCache; int height = configuration.maxImageHeightForDiscCache; if (width > 0 || height > 0) {