summaryrefslogtreecommitdiff
path: root/src/fileops.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/fileops.c')
-rw-r--r--src/fileops.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/fileops.c b/src/fileops.c
index ae240fcd2..95b15c604 100644
--- a/src/fileops.c
+++ b/src/fileops.c
@@ -348,7 +348,8 @@ int git_futils_mkdir(
int tmp_errno = errno;
/* ignore error if directory already exists */
- if (p_stat(make_path.ptr, &st) < 0 || !S_ISDIR(st.st_mode)) {
+ if (p_stat(make_path.ptr, &st) < 0 ||
+ !(S_ISDIR(st.st_mode) || S_ISLNK(st.st_mode))) {
errno = tmp_errno;
giterr_set(GITERR_OS, "Failed to make directory '%s'", make_path.ptr);
goto done;