forked from mirrors/Fedilab
fix media not stored
This commit is contained in:
parent
5d68c223ad
commit
b3e2af6e3c
1 changed files with 2 additions and 1 deletions
|
@ -143,7 +143,8 @@ public class MediaHelper {
|
|||
public void onResourceReady(@NotNull File file, Transition<? super File> 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();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue