Made gitfo_mkdir_recurs() more tolerant.

Doesn't err any more when the directory already exists.
This commit is contained in:
nulltoken 2010-12-17 14:24:47 +01:00
parent a67a096a9e
commit f0b2bfe527

View File

@ -313,5 +313,12 @@ int gitfo_dirent(
int gitfo_mkdir_recurs(const char *path, int mode)
{
return gitfo_mkdir(path, mode);
int error;
error = gitfo_mkdir(path, mode);
if (errno == EEXIST)
return GIT_SUCCESS;
return error;
}