aboutsummaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit/src/org
diff options
context:
space:
mode:
authorAdrien Bustany <adrien-xx-eclipse@bustany.org>2019-08-22 17:11:45 +0200
committerDavid Pursehouse <david.pursehouse@gmail.com>2019-08-23 08:45:55 +0900
commit28553c189c0561b41d31567256cb320c05075d47 (patch)
tree11cbd01dd104bb1573bdd6a012dc0f97946c936f /org.eclipse.jgit/src/org
parente80a62e226f83cde5778ff455d9406c3cc247cf0 (diff)
downloadjgit-28553c189c0561b41d31567256cb320c05075d47.tar.gz
jgit-28553c189c0561b41d31567256cb320c05075d47.zip
Fix copy-paste typo in CloneCommand#cleanup
deleteChildren was called on directory instead of gitDir, leading to a potential null pointer exception if the git directory existed initially. Bug: 550340 Change-Id: Iafc3b2961253a99862a59e81c7371f7bc564b412 Signed-off-by: Adrien Bustany <adrien-xx-eclipse@bustany.org>
Diffstat (limited to 'org.eclipse.jgit/src/org')
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/api/CloneCommand.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/CloneCommand.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/CloneCommand.java
index 5c06bac1f2..eee3da6f63 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/api/CloneCommand.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/CloneCommand.java
@@ -700,7 +700,7 @@ public class CloneCommand extends TransportCommand<CloneCommand, Git> {
FileUtils.delete(gitDir, FileUtils.RECURSIVE
| FileUtils.SKIP_MISSING | FileUtils.IGNORE_ERRORS);
} else {
- deleteChildren(directory);
+ deleteChildren(gitDir);
}
}
} catch (IOException e) {