From b3e2af6e3c025ae8e066fa54ae6fb5d903db9550 Mon Sep 17 00:00:00 2001 From: Thomas Date: Sat, 19 Nov 2022 11:26:54 +0100 Subject: [PATCH] fix media not stored --- app/src/main/java/app/fedilab/android/helper/MediaHelper.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/app/fedilab/android/helper/MediaHelper.java b/app/src/main/java/app/fedilab/android/helper/MediaHelper.java index a307739e..157b01a7 100644 --- a/app/src/main/java/app/fedilab/android/helper/MediaHelper.java +++ b/app/src/main/java/app/fedilab/android/helper/MediaHelper.java @@ -143,7 +143,8 @@ public class MediaHelper { public void onResourceReady(@NotNull File file, Transition transition) { final String fileName = URLUtil.guessFileName(url, null, null); - final String targeted_folder = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_PICTURES).getAbsolutePath() + "/" + context.getString(R.string.app_name); + File path = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_PICTURES); + final String targeted_folder = path + "/" + context.getString(R.string.app_name); if (!new File(targeted_folder).exists()) { new File(targeted_folder).mkdir(); }