aboutsummaryrefslogtreecommitdiff
path: root/app/src
diff options
context:
space:
mode:
Diffstat (limited to 'app/src')
-rw-r--r--app/src/main/java/com/zeapo/pwdstore/utils/PasswordRepository.java4
1 files changed, 2 insertions, 2 deletions
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 82e479eb..990aec39 100644
--- a/app/src/main/java/com/zeapo/pwdstore/utils/PasswordRepository.java
+++ b/app/src/main/java/com/zeapo/pwdstore/utils/PasswordRepository.java
@@ -140,9 +140,9 @@ public class PasswordRepository {
}
// uninitialize the repo if the dir does not exist or is absolutely empty
- if (!dir.exists() || !dir.isDirectory()) {
+ if (!dir.exists() || !dir.isDirectory() || dir.listFiles().length == 0) {
settings.edit().putBoolean("repository_initialized", false).apply();
- } else if (dir.listFiles().length > 0) {
+ } else {
settings.edit().putBoolean("repository_initialized", true).apply();
}