diff options
author | Daniel Rose <droseger@protonmail.com> | 2018-09-19 22:53:11 +0200 |
---|---|---|
committer | Mohamed Zenadi <zeapo@users.noreply.github.com> | 2018-09-19 22:53:11 +0200 |
commit | ac889abdd3d71ffb7f064a384c375ec22e7734c4 (patch) | |
tree | aff04695a321d6d27da2616f4ab57ccf002ade84 /app/src/main/java | |
parent | 6ab252981184e039fadbe5d3b4651ee592fa77d4 (diff) |
don't show hidden files and directories (#424)
Diffstat (limited to 'app/src/main/java')
-rw-r--r-- | app/src/main/java/com/zeapo/pwdstore/autofill/AutofillService.java | 9 | ||||
-rw-r--r-- | app/src/main/java/com/zeapo/pwdstore/utils/PasswordRepository.java | 11 |
2 files changed, 10 insertions, 10 deletions
diff --git a/app/src/main/java/com/zeapo/pwdstore/autofill/AutofillService.java b/app/src/main/java/com/zeapo/pwdstore/autofill/AutofillService.java index 5b969d25..87c0df75 100644 --- a/app/src/main/java/com/zeapo/pwdstore/autofill/AutofillService.java +++ b/app/src/main/java/com/zeapo/pwdstore/autofill/AutofillService.java @@ -386,14 +386,13 @@ public class AutofillService extends AccessibilityService { for (File file : passList) { if (file.isFile()) { - if (appName.toLowerCase().contains(file.getName().toLowerCase().replace(".gpg", ""))) { + if (!file.isHidden() && appName.toLowerCase().contains(file.getName().toLowerCase().replace(".gpg", ""))) { items.add(file); } } else { - // ignore .git and .extensions directory - if (file.getName().equals(".git") || file.getName().equals(".extensions")) - continue; - items.addAll(searchPasswords(file, appName)); + if (!file.isHidden()) { + items.addAll(searchPasswords(file, appName)); + } } } return items; diff --git a/app/src/main/java/com/zeapo/pwdstore/utils/PasswordRepository.java b/app/src/main/java/com/zeapo/pwdstore/utils/PasswordRepository.java index d724f090..a44b10a9 100644 --- a/app/src/main/java/com/zeapo/pwdstore/utils/PasswordRepository.java +++ b/app/src/main/java/com/zeapo/pwdstore/utils/PasswordRepository.java @@ -195,12 +195,13 @@ public class PasswordRepository { for (File file : passList) { if (file.isFile()) { - passwordList.add(PasswordItem.newPassword(file.getName(), file, rootDir)); + if (!file.isHidden()) { + passwordList.add(PasswordItem.newPassword(file.getName(), file, rootDir)); + } } else { - // ignore .git and .extensions directory - if (file.getName().equals(".git") || file.getName().equals(".extensions")) - continue; - passwordList.add(PasswordItem.newCategory(file.getName(), file, rootDir)); + if (!file.isHidden()) { + passwordList.add(PasswordItem.newCategory(file.getName(), file, rootDir)); + } } } sort(passwordList, sortOrder.comparator); |