pull/1403/head
gedoor 3 years ago
parent 5705a09b55
commit 3bcb5bea7d
  1. 4
      app/src/main/java/io/legado/app/utils/DocumentExtensions.kt

@ -100,10 +100,10 @@ object DocumentUtils {
return listFiles(uri.path!!, filter) return listFiles(uri.path!!, filter)
} }
val docList = arrayListOf<FileDoc>() val docList = arrayListOf<FileDoc>()
var cursor: Cursor? = null
try {
val childrenUri = DocumentsContract val childrenUri = DocumentsContract
.buildChildDocumentsUriUsingTree(uri, DocumentsContract.getDocumentId(uri)) .buildChildDocumentsUriUsingTree(uri, DocumentsContract.getDocumentId(uri))
var cursor: Cursor? = null
try {
cursor = appCtx.contentResolver.query( cursor = appCtx.contentResolver.query(
childrenUri, arrayOf( childrenUri, arrayOf(
DocumentsContract.Document.COLUMN_DOCUMENT_ID, DocumentsContract.Document.COLUMN_DOCUMENT_ID,

Loading…
Cancel
Save