Skip to content

Commit 1442993

Browse files
cosmo0920edsiper
authored andcommitted
out_s3: Plug an error for too many argument for mkdir
Signed-off-by: Hiroshi Hatake <[email protected]>
1 parent e37b56b commit 1442993

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

plugins/out_s3/s3.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -380,7 +380,11 @@ static int init_seq_index(void *context) {
380380
}
381381

382382
/* Create directory path if it doesn't exist */
383+
#ifdef FLB_SYSTEM_WINDOWS
384+
ret = mkdir(ctx->metadata_dir);
385+
#else
383386
ret = mkdir(ctx->metadata_dir, 0700);
387+
#endif
384388
if (ret < 0 && errno != EEXIST) {
385389
flb_plg_error(ctx->ins, "Failed to create metadata directory");
386390
return -1;

0 commit comments

Comments
 (0)