From 9b2a80b367d7d84fc10938d7e461adb1d75a2a19 Mon Sep 17 00:00:00 2001 From: yihaoDeng Date: Thu, 14 Nov 2024 19:14:07 +0800 Subject: [PATCH] fix interface update --- source/os/src/osDir.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/source/os/src/osDir.c b/source/os/src/osDir.c index 17d5844c47..fff8b7a628 100644 --- a/source/os/src/osDir.c +++ b/source/os/src/osDir.c @@ -395,7 +395,7 @@ bool taosIsDir(const char *dirname) { } char *taosDirName(char *name) { - if(name == NULL) { + if (name == NULL) { terrno = TSDB_CODE_INVALID_PARA; return NULL; } @@ -425,7 +425,7 @@ char *taosDirName(char *name) { } char *taosDirEntryBaseName(char *name) { - if(name == NULL) { + if (name == NULL) { terrno = TSDB_CODE_INVALID_PARA; return NULL; } @@ -592,7 +592,7 @@ int taosGetDirSize(const char *path, int64_t *size) { return code = terrno; } int32_t nBytes = 0; - char fullPath[512] = {0}; + char fullPath[1024] = {0}; int64_t totalSize = 0; TdDirEntryPtr de = NULL; @@ -610,13 +610,13 @@ int taosGetDirSize(const char *path, int64_t *size) { if (taosIsDir(fullPath)) { code = taosGetDirSize(fullPath, &subSize); if (code != 0) { - taosCloseDir(&pDir); + TAOS_UNUSED(taosCloseDir(&pDir)); return code; } } else { code = taosStatFile(fullPath, &subSize, NULL, NULL); if (code != 0) { - taosCloseDir(&pDir); + TAOS_UNUSED(taosCloseDir(&pDir)); return code; } }