diff options
author | Carlos Martín Nieto <cmn@dwim.me> | 2016-12-11 17:56:38 +0000 |
---|---|---|
committer | Carlos Martín Nieto <cmn@dwim.me> | 2016-12-16 11:33:54 +0000 |
commit | 6ab65b80b47cac90a8ded74e35ad2d4cc1a34cf2 (patch) | |
tree | 60c990b40fafc09ad9376473b9cf460b4fd85d56 | |
parent | c5e6ba289266e56b8e7f7c9b463aa7008d4b0258 (diff) | |
download | libgit2-6ab65b80b47cac90a8ded74e35ad2d4cc1a34cf2.tar.gz |
refdb: bubble up recursive rm when locking a refcmn/refdb-fs-errors
Failure to bubble up this error means some locking errors do not get reported as
such on Windows.
-rw-r--r-- | src/refdb_fs.c | 4 |
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; |