Fixed: Get file basename from Uri path when opening files in termux if failed to get it ContentResolver and EXTRA_TITLE

This commit is contained in:
agnostic-apollo
2021-10-23 22:41:08 +05:00
parent 74b23cb209
commit 7bbc12c7c9
2 changed files with 25 additions and 0 deletions

View File

@@ -142,6 +142,7 @@ public class TermuxFileReceiverActivity extends Activity {
}
if (attachmentFileName == null) attachmentFileName = subjectFromIntent;
if (attachmentFileName == null) attachmentFileName = UriUtils.getUriFileBasename(uri, true);
InputStream in = getContentResolver().openInputStream(uri);
promptNameAndSave(in, attachmentFileName);