mirror of
https://github.com/android-password-store/Android-Password-Store
synced 2025-08-30 13:57:47 +00:00
fix the logic behind empty dir
This commit is contained in:
@@ -140,9 +140,9 @@ public class PasswordRepository {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// uninitialize the repo if the dir does not exist or is absolutely empty
|
// 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();
|
settings.edit().putBoolean("repository_initialized", false).apply();
|
||||||
} else if (dir.listFiles().length > 0) {
|
} else {
|
||||||
settings.edit().putBoolean("repository_initialized", true).apply();
|
settings.edit().putBoolean("repository_initialized", true).apply();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user