mirror of
https://github.com/gedoor/legado.git
synced 2024-07-06 23:47:49 +08:00
本地书籍无权限则保存到自己选定的文件夹
This commit is contained in:
parent
d3c8530556
commit
020adf45ef
@ -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!!
|
||||
|
@ -51,7 +51,6 @@ class TextFile(private val book: Book) {
|
||||
}
|
||||
}
|
||||
|
||||
@Throws(FileNotFoundException::class)
|
||||
private fun analyze(
|
||||
bookFd: FileDescriptor,
|
||||
book: Book,
|
||||
|
Loading…
Reference in New Issue
Block a user