mirror of
https://github.com/android-password-store/Android-Password-Store
synced 2025-08-29 21:38:03 +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) {
|
for (File file : passList) {
|
||||||
if (file.isFile()) {
|
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);
|
items.add(file);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// ignore .git and .extensions directory
|
if (!file.isHidden()) {
|
||||||
if (file.getName().equals(".git") || file.getName().equals(".extensions"))
|
items.addAll(searchPasswords(file, appName));
|
||||||
continue;
|
}
|
||||||
items.addAll(searchPasswords(file, appName));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return items;
|
return items;
|
||||||
|
@ -195,12 +195,13 @@ public class PasswordRepository {
|
|||||||
|
|
||||||
for (File file : passList) {
|
for (File file : passList) {
|
||||||
if (file.isFile()) {
|
if (file.isFile()) {
|
||||||
passwordList.add(PasswordItem.newPassword(file.getName(), file, rootDir));
|
if (!file.isHidden()) {
|
||||||
|
passwordList.add(PasswordItem.newPassword(file.getName(), file, rootDir));
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
// ignore .git and .extensions directory
|
if (!file.isHidden()) {
|
||||||
if (file.getName().equals(".git") || file.getName().equals(".extensions"))
|
passwordList.add(PasswordItem.newCategory(file.getName(), file, rootDir));
|
||||||
continue;
|
}
|
||||||
passwordList.add(PasswordItem.newCategory(file.getName(), file, rootDir));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
sort(passwordList, sortOrder.comparator);
|
sort(passwordList, sortOrder.comparator);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user