diff --git a/plugins/out_s3/s3.c b/plugins/out_s3/s3.c index c896b7e36bb..b8fe80f0dd2 100644 --- a/plugins/out_s3/s3.c +++ b/plugins/out_s3/s3.c @@ -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;