Commit 4a0df574 by Edward Thomson

git_futils_rmdir: only allow `EBUSY` when asked

Only ignore `EBUSY` from `rmdir` when the `GIT_RMDIR_SKIP_NONEMPTY` bit
is set.
parent 83989d70
...@@ -766,6 +766,9 @@ static int futils__rmdir_empty_parent(void *opaque, const char *path) ...@@ -766,6 +766,9 @@ static int futils__rmdir_empty_parent(void *opaque, const char *path)
if (en == ENOENT || en == ENOTDIR) { if (en == ENOENT || en == ENOTDIR) {
/* do nothing */ /* 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) { } else if (en == ENOTEMPTY || en == EEXIST || en == EBUSY) {
error = GIT_ITEROVER; error = GIT_ITEROVER;
} else { } else {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment