From 1de8a400d91edf6a207db20295b4e73d9e165a3c Mon Sep 17 00:00:00 2001 From: gedoor Date: Wed, 31 Mar 2021 13:41:53 +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 --- .../java/io/legado/app/ui/filepicker/FilePickerActivity.kt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/io/legado/app/ui/filepicker/FilePickerActivity.kt b/app/src/main/java/io/legado/app/ui/filepicker/FilePickerActivity.kt index 7f15b115f..5ebddffb8 100644 --- a/app/src/main/java/io/legado/app/ui/filepicker/FilePickerActivity.kt +++ b/app/src/main/java/io/legado/app/ui/filepicker/FilePickerActivity.kt @@ -128,7 +128,9 @@ class FilePickerActivity : } override fun onResult(data: Intent) { - setResult(RESULT_OK, data) + if (data.data != null) { + setResult(RESULT_OK, data) + } finish() }