diff options
author | zeapo <mohamed@zenadi.com> | 2017-09-10 15:03:01 +0200 |
---|---|---|
committer | zeapo <mohamed@zenadi.com> | 2017-09-10 15:03:01 +0200 |
commit | 032e6fc75604df32ae75e2f4d6b27b4aa3521d03 (patch) | |
tree | 49320c2be0e2c1a29e73d4334ebc88b1af15dda1 /app/src/main | |
parent | 4ada6df1e57b62ab006fad0c0962129af446bc8f (diff) |
do not show the clone screen if the store is "just" empty
Diffstat (limited to 'app/src/main')
-rw-r--r-- | app/src/main/java/com/zeapo/pwdstore/utils/PasswordRepository.java | 6 |
1 files changed, 2 insertions, 4 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 22a1fd21..82e479eb 100644 --- a/app/src/main/java/com/zeapo/pwdstore/utils/PasswordRepository.java +++ b/app/src/main/java/com/zeapo/pwdstore/utils/PasswordRepository.java @@ -140,11 +140,9 @@ public class PasswordRepository { } // uninitialize the repo if the dir does not exist or is absolutely empty - if (!dir.exists() || !dir.isDirectory() || FileUtils.listFiles(dir, null, false).isEmpty()) { + if (!dir.exists() || !dir.isDirectory()) { settings.edit().putBoolean("repository_initialized", false).apply(); - } - - if (!PasswordRepository.getPasswords(dir).isEmpty()) { + } else if (dir.listFiles().length > 0) { settings.edit().putBoolean("repository_initialized", true).apply(); } |