fix syscap_tool output path failed.

Signed-off-by: yudechen <chenyude@huawei.com>
Change-Id: Ie9f1c0ebc77c2efaaf9d8cd09b5fe0e6e8a2dffa
This commit is contained in:
yudechen
2022-05-23 20:18:35 +08:00
parent 53f11a78c2
commit eb90290d4c
+1 -2
View File
@@ -108,7 +108,6 @@ static int32_t ConvertedContextSaveAsFile(char *outDirPath, const char *filename
{
int32_t ret;
FILE *fp = NULL;
int32_t pathLen = strlen(outDirPath);
char path[PATH_MAX + 1] = {0x00};
#ifdef _POSIX_
@@ -122,7 +121,7 @@ static int32_t ConvertedContextSaveAsFile(char *outDirPath, const char *filename
return -1;
}
#endif
int32_t pathLen = strlen(path);
if (path[pathLen - 1] != '/' && path[pathLen - 1] != '\\') {
path[pathLen] = '/';
}