diff options
author | Scott J. Goldman <scottjgo@gmail.com> | 2012-05-10 00:37:03 -0700 |
---|---|---|
committer | Scott J. Goldman <scottjgo@gmail.com> | 2012-05-10 17:13:06 -0700 |
commit | 54bdc64a92bbef7fcc311fa00e38e32cb0bc71e5 (patch) | |
tree | 05fd5da54b9c9791c67d1d8f8ce5344513ba4c68 /src/fileops.c | |
parent | ec42eafd4adea021d86c6fa2cbde92b87177bf3d (diff) | |
download | libgit2-54bdc64a92bbef7fcc311fa00e38e32cb0bc71e5.tar.gz |
Fix rmdir() usage on Solaris
On Solaris, rmdir() throws EEXIST if the folder is not empty, so just add
one more case to check for that, alongside ENOTEMPTY.
Diffstat (limited to 'src/fileops.c')
-rw-r--r-- | src/fileops.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/fileops.c b/src/fileops.c index bf95f769c..2c3192c92 100644 --- a/src/fileops.c +++ b/src/fileops.c @@ -309,7 +309,7 @@ static int _rmdir_recurs_foreach(void *opaque, git_buf *path) return -1; if (p_rmdir(path->ptr) < 0) { - if (removal_type == GIT_DIRREMOVAL_ONLY_EMPTY_DIRS && errno == ENOTEMPTY) + if (removal_type == GIT_DIRREMOVAL_ONLY_EMPTY_DIRS && (errno == ENOTEMPTY || errno == EEXIST)) return 0; giterr_set(GITERR_OS, "Could not remove directory '%s'", path->ptr); |