Skip to content

An open-source cross-platform alternative to AirDrop

fix: use correct children uri

Tien Do Nam15c94d466023
diff --git a/app/android/app/src/main/kotlin/org/localsend/localsend_app/MainActivity.kt b/app/android/app/src/main/kotlin/org/localsend/localsend_app/MainActivity.kt
index b7ee1d40..345651f2 100644
--- a/app/android/app/src/main/kotlin/org/localsend/localsend_app/MainActivity.kt
+++ b/app/android/app/src/main/kotlin/org/localsend/localsend_app/MainActivity.kt
@@ -209,8 +209,9 @@ class MainActivity : FlutterActivity() {
private fun folderExists(documentUri: Uri, folderName: String): Boolean {
var cursor: Cursor? = null
try {
+ val childrenUri = DocumentsContract.buildChildDocumentsUriUsingTree(documentUri, DocumentsContract.getDocumentId(documentUri))
cursor = contentResolver.query(
- documentUri,
+ childrenUri,
arrayOf(
DocumentsContract.Document.COLUMN_DISPLAY_NAME,
DocumentsContract.Document.COLUMN_MIME_TYPE