diff --git a/app/src/main/java/com/zeapo/pwdstore/git/GitActivity.java b/app/src/main/java/com/zeapo/pwdstore/git/GitActivity.java index 6eabe5352..996141a97 100644 --- a/app/src/main/java/com/zeapo/pwdstore/git/GitActivity.java +++ b/app/src/main/java/com/zeapo/pwdstore/git/GitActivity.java @@ -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) {