From 020adf45ef7f9ee2b0c0b915936f29250ba5cd6a Mon Sep 17 00:00:00 2001 From: gedoor Date: Fri, 31 Dec 2021 17:34:10 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9C=AC=E5=9C=B0=E4=B9=A6=E7=B1=8D=E6=97=A0?= =?UTF-8?q?=E6=9D=83=E9=99=90=E5=88=99=E4=BF=9D=E5=AD=98=E5=88=B0=E8=87=AA?= =?UTF-8?q?=E5=B7=B1=E9=80=89=E5=AE=9A=E7=9A=84=E6=96=87=E4=BB=B6=E5=A4=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/io/legado/app/model/localBook/LocalBook.kt | 7 ------- .../main/java/io/legado/app/model/localBook/TextFile.kt | 1 - 2 files changed, 8 deletions(-) diff --git a/app/src/main/java/io/legado/app/model/localBook/LocalBook.kt b/app/src/main/java/io/legado/app/model/localBook/LocalBook.kt index 157371602..8294ace2e 100644 --- a/app/src/main/java/io/legado/app/model/localBook/LocalBook.kt +++ b/app/src/main/java/io/legado/app/model/localBook/LocalBook.kt @@ -72,13 +72,6 @@ object LocalBook { path = uri.toString() val doc = DocumentFile.fromSingleUri(appCtx, uri)!! updateTime = doc.lastModified() - val bookFile = cacheFolder.getFile(doc.name!!) - if (!bookFile.exists()) { - bookFile.createNewFile() - doc.readBytes(appCtx).let { bytes -> - bookFile.writeBytes(bytes) - } - } doc.name!! } else { path = uri.path!! diff --git a/app/src/main/java/io/legado/app/model/localBook/TextFile.kt b/app/src/main/java/io/legado/app/model/localBook/TextFile.kt index c48471edd..b875dafa9 100644 --- a/app/src/main/java/io/legado/app/model/localBook/TextFile.kt +++ b/app/src/main/java/io/legado/app/model/localBook/TextFile.kt @@ -51,7 +51,6 @@ class TextFile(private val book: Book) { } } - @Throws(FileNotFoundException::class) private fun analyze( bookFd: FileDescriptor, book: Book,