Guess all attachment extensions

This commit is contained in:
M66B 2022-06-04 08:18:50 +02:00
parent 0d27a3f77c
commit c9eb3ebae3
1 changed files with 3 additions and 3 deletions

View File

@ -4237,9 +4237,9 @@ public class FragmentCompose extends FragmentBase {
UriInfo info = getInfo(uri, context);
String ext = Helper.getExtension(info.name);
if (info.name != null && ext == null &&
info.type != null && ImageHelper.isImage(info.type.toLowerCase(Locale.ROOT))) {
String guessed = MimeTypeMap.getSingleton().getExtensionFromMimeType(info.type.toLowerCase(Locale.ROOT));
if (info.name != null && ext == null && info.type != null) {
String guessed = MimeTypeMap.getSingleton()
.getExtensionFromMimeType(info.type.toLowerCase(Locale.ROOT));
if (!TextUtils.isEmpty(guessed)) {
ext = guessed;
info.name += '.' + ext;