Skip to content

Commit

Permalink
out_s3: Plug an error for too many argument for mkdir
Browse files Browse the repository at this point in the history
Signed-off-by: Hiroshi Hatake <[email protected]>
  • Loading branch information
cosmo0920 authored and edsiper committed Aug 28, 2024
1 parent e37b56b commit 1442993
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions plugins/out_s3/s3.c
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,11 @@ static int init_seq_index(void *context) {
}

/* Create directory path if it doesn't exist */
#ifdef FLB_SYSTEM_WINDOWS
ret = mkdir(ctx->metadata_dir);
#else
ret = mkdir(ctx->metadata_dir, 0700);
#endif
if (ret < 0 && errno != EEXIST) {
flb_plg_error(ctx->ins, "Failed to create metadata directory");
return -1;
Expand Down

0 comments on commit 1442993

Please sign in to comment.