diff options
author | Maxime Catrice <m.catrice@outlook.com> | 2020-04-25 11:48:19 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-25 15:18:19 +0530 |
commit | f7dbac464969f6bff8ac1b4a16b57ecf5d95bd2e (patch) | |
tree | 7210506b59a3a58b6156279c654d5f684cafb283 /app | |
parent | 73695e2493af46c2375bb7678cb879d33a8aed4f (diff) |
Fix search if external root dir starts with a dot (#743)
Fixes #740
Co-Authored-By: Fabian Henneke <FabianHenneke@users.noreply.github.com>
Diffstat (limited to 'app')
-rw-r--r-- | app/src/main/java/com/zeapo/pwdstore/SearchableRepositoryViewModel.kt | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/app/src/main/java/com/zeapo/pwdstore/SearchableRepositoryViewModel.kt b/app/src/main/java/com/zeapo/pwdstore/SearchableRepositoryViewModel.kt index 3dcca85f..1f431a0e 100644 --- a/app/src/main/java/com/zeapo/pwdstore/SearchableRepositoryViewModel.kt +++ b/app/src/main/java/com/zeapo/pwdstore/SearchableRepositoryViewModel.kt @@ -266,7 +266,8 @@ class SearchableRepositoryViewModel(application: Application) : AndroidViewModel private fun listFilesRecursively(dir: File): Flow<File> { return dir - .walkTopDown().onEnter { file -> shouldTake(file) } + // Take top directory even if it is hidden. + .walkTopDown().onEnter { file -> file == dir || shouldTake(file) } .asFlow() // Skip the root directory .drop(1) |