Skip to content

Commit 12ff7bc

Browse files
committed
fix
1 parent 16a611e commit 12ff7bc

File tree

1 file changed

+2
-13
lines changed
  • src/plugins/system/android/com/foxdebug/system

1 file changed

+2
-13
lines changed

src/plugins/system/android/com/foxdebug/system/System.java

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -697,24 +697,13 @@ private void compareFileText(
697697
String treeUriStr = parts[0];
698698
String docId = parts[1];
699699

700-
// Convert to proper document URI using DocumentsContract
700+
// Build document URI directly from tree URI and document ID
701701
Uri treeUri = Uri.parse(treeUriStr);
702-
String treeDocId = DocumentsContract.getTreeDocumentId(treeUri);
703-
Uri baseUri = DocumentsContract.buildDocumentUriUsingTree(treeUri, treeDocId);
704-
resolvedUri = DocumentsContract.buildDocumentUriUsingTree(baseUri, docId);
702+
resolvedUri = DocumentsContract.buildDocumentUriUsingTree(treeUri, docId);
705703
} catch (Exception e) {
706704
callback.error("SAF_FALLBACK: Invalid SAF URI format - " + e.getMessage());
707705
return;
708706
}
709-
} else if (uriString.contains("/tree/")) {
710-
// Regular tree URI without :: separator
711-
try {
712-
String treeDocId = DocumentsContract.getTreeDocumentId(uri);
713-
resolvedUri = DocumentsContract.buildDocumentUriUsingTree(uri, treeDocId);
714-
} catch (Exception e) {
715-
// Not a valid tree URI, use as-is
716-
resolvedUri = uri;
717-
}
718707
}
719708

720709
// Try to open the resolved URI

0 commit comments

Comments
 (0)