From 032e6fc75604df32ae75e2f4d6b27b4aa3521d03 Mon Sep 17 00:00:00 2001 From: zeapo Date: Sun, 10 Sep 2017 15:03:01 +0200 Subject: do not show the clone screen if the store is "just" empty --- app/src/main/java/com/zeapo/pwdstore/utils/PasswordRepository.java | 6 ++---- 1 file 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(); } -- cgit v1.2.3