fix the case where localDir does not exist
which is the common situation..
This commit is contained in:
parent
d13438b67a
commit
e85cd2297b
1 changed files with 1 additions and 1 deletions
|
@ -595,7 +595,7 @@ public class GitActivity extends AppCompatActivity {
|
||||||
} else {
|
} else {
|
||||||
try {
|
try {
|
||||||
// Silently delete & replace the lone .git folder if it exists
|
// 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 {
|
try {
|
||||||
FileUtils.deleteDirectory(localDir);
|
FileUtils.deleteDirectory(localDir);
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
|
|
Loading…
Reference in a new issue