diff options
| author | Vicent Martà <vicent@github.com> | 2013-06-24 11:20:57 -0700 |
|---|---|---|
| committer | Vicent Martà <vicent@github.com> | 2013-06-24 11:20:57 -0700 |
| commit | 6c4dadba4526d90ab74b9b36e788b66afb688feb (patch) | |
| tree | bff64dd1398c1b35c95fe84436e8959693a6fc19 /src/fileops.c | |
| parent | 9f1b2c5cb79526f274c0c72eed56f9da0efb0321 (diff) | |
| parent | 32c12ea6a9cafd76a746af2e2be9366c95752f5b (diff) | |
| download | libgit2-6c4dadba4526d90ab74b9b36e788b66afb688feb.tar.gz | |
Merge pull request #1669 from arrbee/fix-index-add-bypath
In loose objects backend, constrain mkdir calls to avoid extra mkdirs
Diffstat (limited to 'src/fileops.c')
| -rw-r--r-- | src/fileops.c | 3 |
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; |
