Skip to content

Commit d267843

Browse files
kevin-canadianLeonid Pliushch
authored and
Leonid Pliushch
committed
Don't exclude hidden files from document provider (#1220)
Credit to @johnmellor for requesting the document provider in the first place via #79, mentioning this limitation in a comment on that issue, and creating a commit like this one to address it.
1 parent 5ca67dd commit d267843

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

app/src/main/java/com/termux/filepicker/TermuxDocumentsProvider.java

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -91,9 +91,7 @@ public Cursor queryChildDocuments(String parentDocumentId, String[] projection,
9191
final MatrixCursor result = new MatrixCursor(projection != null ? projection : DEFAULT_DOCUMENT_PROJECTION);
9292
final File parent = getFileForDocId(parentDocumentId);
9393
for (File file : parent.listFiles()) {
94-
if (!file.getName().startsWith(".")) {
95-
includeFile(result, null, file);
96-
}
94+
includeFile(result, null, file);
9795
}
9896
return result;
9997
}
@@ -177,8 +175,7 @@ public Cursor querySearchDocuments(String rootId, String query, String[] project
177175
} catch (IOException e) {
178176
isInsideHome = true;
179177
}
180-
final boolean isHidden = file.getName().startsWith(".");
181-
if (isInsideHome && !isHidden) {
178+
if (isInsideHome) {
182179
if (file.isDirectory()) {
183180
Collections.addAll(pending, file.listFiles());
184181
} else {

0 commit comments

Comments
 (0)