From c15571bc0b5ca1bf8cd7178de344132f5ce00a2b Mon Sep 17 00:00:00 2001 From: ingrid Date: Thu, 30 Mar 2017 16:00:54 +0200 Subject: [PATCH] Fix generateStorageDir when pathToDirectory is null --- .../florent37/camerafragment/internal/utils/CameraHelper.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/camerafragment/src/main/java/com/github/florent37/camerafragment/internal/utils/CameraHelper.java b/camerafragment/src/main/java/com/github/florent37/camerafragment/internal/utils/CameraHelper.java index 701f025..a893f4f 100644 --- a/camerafragment/src/main/java/com/github/florent37/camerafragment/internal/utils/CameraHelper.java +++ b/camerafragment/src/main/java/com/github/florent37/camerafragment/internal/utils/CameraHelper.java @@ -78,7 +78,7 @@ public final class CameraHelper { if (pathToDirectory != null) { mediaStorageDir = new File(pathToDirectory); } else { - new File(Environment.getExternalStoragePublicDirectory( + mediaStorageDir = new File(Environment.getExternalStoragePublicDirectory( Environment.DIRECTORY_PICTURES), context.getPackageName()); }