aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/tool_dirhie.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/tool_dirhie.c b/src/tool_dirhie.c
index a01f9dc5f..36c06941c 100644
--- a/src/tool_dirhie.c
+++ b/src/tool_dirhie.c
@@ -139,12 +139,10 @@ CURLcode create_dir_hierarchy(const char *outfile, FILE *errors)
else
snprintf(dirbuildup, outlen, "%s%s", DIR_CHAR, tempdir);
}
- if(access(dirbuildup, F_OK) == -1) {
- if(-1 == mkdir(dirbuildup, (mode_t)0000750)) {
- show_dir_errno(errors, dirbuildup);
- result = CURLE_WRITE_ERROR;
- break; /* get out of loop */
- }
+ if((-1 == mkdir(dirbuildup, (mode_t)0000750)) && (errno != EEXIST)) {
+ show_dir_errno(errors, dirbuildup);
+ result = CURLE_WRITE_ERROR;
+ break; /* get out of loop */
}
}
tempdir = tempdir2;