diff options
Diffstat (limited to 'src/clone.c')
-rw-r--r-- | src/clone.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/clone.c b/src/clone.c index ffbe8f8af..828c47ffb 100644 --- a/src/clone.c +++ b/src/clone.c @@ -408,9 +408,10 @@ int git_clone( git_remote_free(origin); } - if (error < 0) { + if (error != 0) { git_repository_free(repo); repo = NULL; + (void)git_futils_rmdir_r(local_path, NULL, rmdir_flags); } |