Skip to content

Commit 3714c13

Browse files
authored
Merge pull request libgit2#4026 from libgit2/cmn/refdb-fs-errors
refdb: bubble up recursive rm when locking a ref
2 parents 903955f + 6ab65b8 commit 3714c13

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/refdb_fs.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -729,8 +729,8 @@ static int loose_lock(git_filebuf *file, refdb_fs_backend *backend, const char *
729729
/* Remove a possibly existing empty directory hierarchy
730730
* which name would collide with the reference name
731731
*/
732-
if (git_futils_rmdir_r(name, backend->path, GIT_RMDIR_SKIP_NONEMPTY) < 0)
733-
return -1;
732+
if ((error = git_futils_rmdir_r(name, backend->path, GIT_RMDIR_SKIP_NONEMPTY)) < 0)
733+
return error;
734734

735735
if (git_buf_joinpath(&ref_path, backend->path, name) < 0)
736736
return -1;

0 commit comments

Comments
 (0)