mirror of
https://github.com/android-password-store/Android-Password-Store
synced 2025-08-29 13:27:46 +00:00
don't show hidden files and directories (#424)
This commit is contained in:
parent
6ab2529811
commit
ac889abdd3
@ -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;
|
||||
|
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user