minor
This commit is contained in:
parent
ef091b9932
commit
3bcaab9a4b
2 changed files with 2 additions and 0 deletions
|
@ -710,6 +710,7 @@ class MediaStoreImageProvider : ImageProvider() {
|
|||
// note that `DocumentFile.getParentFile()` returns null if we did not pick a tree first
|
||||
val targetTreeFile = targetDirDocFile.createFile(mimeType, targetNameWithoutExtension)
|
||||
val targetDocFile = DocumentFileCompat.fromSingleUri(activity, targetTreeFile.uri)
|
||||
// TODO TLAD [missing extension] check whether targetDocFile.name has a valid extension
|
||||
|
||||
try {
|
||||
targetDocFile.openOutputStream().use(write)
|
||||
|
|
|
@ -168,6 +168,7 @@ object MimeTypes {
|
|||
HEIC, HEIF -> ".heif"
|
||||
MP2T, MP2TS -> ".m2ts"
|
||||
PSD_VND, PSD_X -> ".psd"
|
||||
// TODO TLAD [missing extension] check whether to define more manual mapping and raise exception on miss
|
||||
else -> MimeTypeMap.getSingleton().getExtensionFromMimeType(mimeType)?.let { ".$it" }
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue