summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarlos Martín Nieto <carlosmn@github.com>2016-12-19 17:28:41 +0000
committerGitHub <noreply@github.com>2016-12-19 17:28:41 +0000
commit3714c13a888cfa539d1c6924d6b7bc747c137a42 (patch)
treede9a05b8ac2c5d8bfc4846c89c15e4e5823cf125
parent903955f7e5d81e12ef806636c7c5fbfd6203266c (diff)
parent6ab65b80b47cac90a8ded74e35ad2d4cc1a34cf2 (diff)
downloadlibgit2-3714c13a888cfa539d1c6924d6b7bc747c137a42.tar.gz
Merge pull request #4026 from libgit2/cmn/refdb-fs-errors
refdb: bubble up recursive rm when locking a ref
-rw-r--r--src/refdb_fs.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/refdb_fs.c b/src/refdb_fs.c
index 558d06094..8739d5b89 100644
--- a/src/refdb_fs.c
+++ b/src/refdb_fs.c
@@ -729,8 +729,8 @@ static int loose_lock(git_filebuf *file, refdb_fs_backend *backend, const char *
/* Remove a possibly existing empty directory hierarchy
* which name would collide with the reference name
*/
- if (git_futils_rmdir_r(name, backend->path, GIT_RMDIR_SKIP_NONEMPTY) < 0)
- return -1;
+ if ((error = git_futils_rmdir_r(name, backend->path, GIT_RMDIR_SKIP_NONEMPTY)) < 0)
+ return error;
if (git_buf_joinpath(&ref_path, backend->path, name) < 0)
return -1;