mirror of
https://github.com/android-password-store/Android-Password-Store
synced 2025-08-30 22:05:19 +00:00
fix the case where localDir does not exist
which is the common situation..
This commit is contained in:
@@ -595,7 +595,7 @@ public class GitActivity extends AppCompatActivity {
|
||||
} else {
|
||||
try {
|
||||
// Silently delete & replace the lone .git folder if it exists
|
||||
if (localDir.listFiles().length == 1 && localDir.listFiles()[0].getName().equals(".git")) {
|
||||
if (localDir.exists() && localDir.listFiles().length == 1 && localDir.listFiles()[0].getName().equals(".git")) {
|
||||
try {
|
||||
FileUtils.deleteDirectory(localDir);
|
||||
} catch (IOException e) {
|
||||
|
Reference in New Issue
Block a user