diff options
author | Adrien Bustany <adrien-xx-eclipse@bustany.org> | 2019-08-22 17:11:45 +0200 |
---|---|---|
committer | David Pursehouse <david.pursehouse@gmail.com> | 2019-08-23 08:45:55 +0900 |
commit | 28553c189c0561b41d31567256cb320c05075d47 (patch) | |
tree | 11cbd01dd104bb1573bdd6a012dc0f97946c936f /org.eclipse.jgit/src/org | |
parent | e80a62e226f83cde5778ff455d9406c3cc247cf0 (diff) | |
download | jgit-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.java | 2 |
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) { |