From db0f89d0d85036f4db05ceec7fb1060798d1199b Mon Sep 17 00:00:00 2001 From: gedoor Date: Tue, 13 Apr 2021 12:18:11 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/io/legado/app/ui/document/FilePickerActivity.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/io/legado/app/ui/document/FilePickerActivity.kt b/app/src/main/java/io/legado/app/ui/document/FilePickerActivity.kt index 3c83b3845..c3f601271 100644 --- a/app/src/main/java/io/legado/app/ui/document/FilePickerActivity.kt +++ b/app/src/main/java/io/legado/app/ui/document/FilePickerActivity.kt @@ -123,7 +123,7 @@ class FilePickerActivity : "txt", "xml" -> types.add("text/*") else -> { val mime = MimeTypeMap.getSingleton() - .getMimeTypeFromExtension("json") + .getMimeTypeFromExtension(it) ?: "application/octet-stream" types.add(mime) }