mirror of
https://git.proxmox.com/git/libgit2
synced 2025-08-04 15:07:41 +00:00
git_futils_rmdir: only allow EBUSY
when asked
Only ignore `EBUSY` from `rmdir` when the `GIT_RMDIR_SKIP_NONEMPTY` bit is set.
This commit is contained in:
parent
83989d70ec
commit
4a0df57411
@ -766,6 +766,9 @@ static int futils__rmdir_empty_parent(void *opaque, const char *path)
|
||||
|
||||
if (en == ENOENT || en == ENOTDIR) {
|
||||
/* do nothing */
|
||||
} else if ((data->flags & GIT_RMDIR_SKIP_NONEMPTY) == 0 &&
|
||||
en == EBUSY) {
|
||||
error = git_path_set_error(errno, path, "rmdir");
|
||||
} else if (en == ENOTEMPTY || en == EEXIST || en == EBUSY) {
|
||||
error = GIT_ITEROVER;
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user