rsync: return 0 if no errno

This commit is contained in:
Minglei Jin 2024-10-11 13:44:59 +08:00
parent 7792906622
commit 4d0ca2c4d4
2 changed files with 7 additions and 3 deletions

View File

@ -160,7 +160,11 @@ int32_t startRsync() {
code = system(cmd);
if (code != 0) {
uError("[rsync] cmd:%s start server failed, code:%d," ERRNO_ERR_FORMAT, cmd, code, ERRNO_ERR_DATA);
code = TAOS_SYSTEM_ERROR(errno);
if (errno == 0) {
return 0;
} else {
code = TAOS_SYSTEM_ERROR(errno);
}
} else {
uInfo("[rsync] cmd:%s start server successful", cmd);
}
@ -358,4 +362,4 @@ int32_t deleteRsync(const char* id) {
uDebug("[rsync] delete data:%s successful", id);
return 0;
}
}

View File

@ -21,7 +21,7 @@
#include "taoserror.h"
#include "tglobal.h"
#if !defined(USE_S3)
#if defined(USE_S3)
#include <azure/core.hpp>
#include <azure/storage/blobs.hpp>