Merge pull request #25758 from taosdata/fix/TD-30036

fix(cos/checks3): failed early if not enabled
This commit is contained in:
Hongze Cheng 2024-05-14 16:27:53 +08:00 committed by GitHub
commit c581432054
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 5 additions and 0 deletions

View File

@ -63,6 +63,11 @@ static int32_t s3ListBucket(char const *bucketname);
int32_t s3CheckCfg() { int32_t s3CheckCfg() {
int32_t code = 0; int32_t code = 0;
if (!tsS3Enabled) {
fprintf(stderr, "s3 not configured.\n");
goto _exit;
}
code = s3Begin(); code = s3Begin();
if (code != 0) { if (code != 0) {
fprintf(stderr, "failed to initialize s3.\n"); fprintf(stderr, "failed to initialize s3.\n");