Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

[library] Throw exception if the Disk Location is not write-able.

  • Loading branch information...
commit 0628bbf5784e6218bfaece97fcff717a5fed384c 1 parent b34e45b
@chrisbanes authored
Showing with 3 additions and 1 deletion.
  1. +3 −1 library/src/uk/co/senab/bitmapcache/BitmapLruCache.java
View
4 library/src/uk/co/senab/bitmapcache/BitmapLruCache.java
@@ -13,6 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
******************************************************************************/
+
package uk.co.senab.bitmapcache;
import com.jakewharton.DiskLruCache;
@@ -683,12 +684,13 @@ private boolean isValidOptionsForDiskCache() {
Log.i(Constants.LOG_TAG,
"Disk Cache has been enabled, but no location given. Please call setDiskCacheLocation(...)");
return false;
+ } else if (!mDiskCacheLocation.canWrite()) {
+ throw new IllegalArgumentException("Disk Cache Location is not write-able");
}
return true;
}
return false;
-
}
private boolean isValidOptionsForMemoryCache() {
Please sign in to comment.
Something went wrong with that request. Please try again.