Merge pull request #1856 from Dw9/master

修复pr1851 删除文件判断逻辑错误
This commit is contained in:
Dw9
2022-08-04 22:29:34 +08:00
committed by GitHub

View File

@@ -1342,11 +1342,14 @@ void installWebApi() {
auto period = allArgs["period"];
record_path = record_path + period + "/";
int result = File::delete_file(record_path.data());
if(!result) {
if (result != 0) {
record_path = "delete error";
val["path"] = record_path;
} else {
val["path"] = record_path.data();
}
val["code"] = result;
val["path"] = record_path.data();
});
//获取录像文件夹列表或mp4文件列表