diff options
author | zeapo <mohamed@zenadi.com> | 2017-08-10 11:43:15 +0200 |
---|---|---|
committer | zeapo <mohamed@zenadi.com> | 2017-08-10 11:43:15 +0200 |
commit | 79e99cceac439c18e6f048fdb1b8875e91fdf120 (patch) | |
tree | 62e0b1f67a6ffd19b32625e9bcc136e16bc3fffd /app/src | |
parent | 8611fe379c17a4f308706ff166db226eb620321b (diff) |
no need to list files as a store can be empty
Diffstat (limited to 'app/src')
-rw-r--r-- | app/src/main/java/com/zeapo/pwdstore/PasswordStore.java | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/app/src/main/java/com/zeapo/pwdstore/PasswordStore.java b/app/src/main/java/com/zeapo/pwdstore/PasswordStore.java index dd79de8b..5f4e3096 100644 --- a/app/src/main/java/com/zeapo/pwdstore/PasswordStore.java +++ b/app/src/main/java/com/zeapo/pwdstore/PasswordStore.java @@ -307,11 +307,11 @@ public class PasswordStore extends AppCompatActivity { } private void initializeRepositoryInfo() { - if (settings.getBoolean("git_external", false) && settings.getString("git_external_repo", null) != null) { - File dir = new File(settings.getString("git_external_repo", null)); + final String externalRepoPath = settings.getString("git_external_repo", null); + if (settings.getBoolean("git_external", false) && externalRepoPath != null) { + File dir = new File(externalRepoPath); - if (dir.exists() && dir.isDirectory() && !FileUtils.listFiles(dir, null, true).isEmpty() && - !PasswordRepository.getPasswords(dir, PasswordRepository.getRepositoryDirectory(this)).isEmpty()) { + if (dir.exists() && dir.isDirectory() && !PasswordRepository.getPasswords(dir, PasswordRepository.getRepositoryDirectory(this)).isEmpty()) { PasswordRepository.closeRepository(); checkLocalRepository(); return; // if not empty, just show me the passwords! |