From 19e7b58dd8f90faf8acaf48942f51e7dac9e3a36 Mon Sep 17 00:00:00 2001 From: Xwite <1797350009@qq.com> Date: Mon, 29 Aug 2022 08:49:17 +0800 Subject: [PATCH] fix: change epub file copy position BookHelp.clearInvalidCache will delete epub file, move to book folder rather than cache folder fix #2206 --- app/src/main/java/io/legado/app/help/BookHelp.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/io/legado/app/help/BookHelp.kt b/app/src/main/java/io/legado/app/help/BookHelp.kt index ac5cac99f..5bb49d90a 100644 --- a/app/src/main/java/io/legado/app/help/BookHelp.kt +++ b/app/src/main/java/io/legado/app/help/BookHelp.kt @@ -165,7 +165,7 @@ object BookHelp { fun getEpubFile(book: Book): ZipFile { val uri = Uri.parse(book.bookUrl) if (uri.isContentScheme()) { - val path = FileUtils.getPath(downloadDir, cacheFolderName, book.originName) + val path = FileUtils.getPath(downloadDir, cacheFolderName, book.getFolderName(), book.originName) val file = File(path) val doc = DocumentFile.fromSingleUri(appCtx, uri) ?: throw IOException("文件不存在")