Code review from 彭磊
* refs/changes/251/head: (8 commits squashed)
- 添加蓝牙产测麦克风测试项,添加tar保存exc文件功能
- Merge branch 'sdk602patch0521' of https://codeup.aliyun.com/
64191456b9581d62e8f81ac0/FD230 into remotes/origin/sdk602patch0521
- 补交
- 补交
- Merge branch 'sdk602patch0521' of https://codeup.aliyun.com/
64191456b9581d62e8f81ac0/FD230 into remotes/origin/sdk602patch0521
- 优化麦克风蓝牙产测,优化tar保存死机文件
- Merge branch 'sdk602patch0521' of https://codeup.aliyun.com/
64191456b9581d62e8f81ac0/FD230 into remotes/origin/sdk602patch0521
- 优化tar保存exc文件
Signed-off-by: aliyun6865282430 <1624952103@qq.com>
Reviewed-by: snickersun@163.com <accounts_62b90f7fcf51ade33b6f628e@mail.teambition.com>
Merged-by: snickersun@163.com <accounts_62b90f7fcf51ade33b6f628e@mail.teambition.com>
link: https://codeup.aliyun.com/64191456b9581d62e8f81ac0/FD230/change/251
struct stat file_inf;
int ret = 0;
+ if(access(folderPath, F_OK) == -1)
+ {
+ if(ret == -1)
+ {
+ PRINT("%s does not exist!!!\r\n", folderPath);
+ return -1;
+ }
+ }
+
dir = opendir(folderPath);
if (dir == NULL)
{
return -1;
}
+ if((entry = readdir(dir)) == NULL)
+ {
+ PRINT("%s is empty\r\n",folderPath);
+ return -1;
+ }
+
if(access(tarPath, F_OK) == -1)
{
ret = mkdir(tarPath, 0777);
/* Close archive */
mtar_close(&tar);
closedir(dir);
+ removeFilesInFolder(folderPath);
return ret;
}