fix the logic behind empty dir
This commit is contained in:
parent
8e145191fe
commit
fdfeaa0043
1 changed files with 2 additions and 2 deletions
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue