From f0b2bfe52743e98e241405008744d39f12e521b3 Mon Sep 17 00:00:00 2001 From: nulltoken Date: Fri, 17 Dec 2010 14:24:47 +0100 Subject: [PATCH] Made gitfo_mkdir_recurs() more tolerant. Doesn't err any more when the directory already exists. --- src/fileops.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/fileops.c b/src/fileops.c index 9fe017c93..8cdfb0345 100644 --- a/src/fileops.c +++ b/src/fileops.c @@ -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; } \ No newline at end of file