From 1ff21378c2bbcd5018a147b78044d896e5a673d5 Mon Sep 17 00:00:00 2001 From: gedoor Date: Tue, 2 Feb 2021 10:21:35 +0800 Subject: [PATCH] edit BgTextConfigDialog.kt --- .../io/legado/app/ui/book/read/config/BgTextConfigDialog.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/io/legado/app/ui/book/read/config/BgTextConfigDialog.kt b/app/src/main/java/io/legado/app/ui/book/read/config/BgTextConfigDialog.kt index 7ea23b09c..edf99df17 100644 --- a/app/src/main/java/io/legado/app/ui/book/read/config/BgTextConfigDialog.kt +++ b/app/src/main/java/io/legado/app/ui/book/read/config/BgTextConfigDialog.kt @@ -204,7 +204,7 @@ class BgTextConfigDialog : BaseDialogFragment(), FilePickerDialog.CallBack { val exportFileName = if (ReadBookConfig.config.name.isBlank()) { configFileName } else { - ReadBookConfig.config.name + "${ReadBookConfig.config.name}.zip" } execute { val exportFiles = arrayListOf() @@ -257,7 +257,7 @@ class BgTextConfigDialog : BaseDialogFragment(), FilePickerDialog.CallBack { if (ZipUtils.zipFiles(exportFiles, File(configZipPath))) { if (uri.isContentScheme()) { DocumentFile.fromTreeUri(requireContext(), uri)?.let { treeDoc -> - treeDoc.findFile(configFileName)?.delete() + treeDoc.findFile(exportFileName)?.delete() treeDoc.createFile("", exportFileName) ?.writeBytes(requireContext(), File(configZipPath).readBytes()) }