修复pr1885 删除文件判断逻辑错误

This commit is contained in:
Dw9 2022-08-04 22:00:44 +08:00
parent db70aec690
commit 73d2cd4ff7

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["code"] = result;
val["path"] = record_path;
} else {
val["path"] = record_path.data();
}
val["code"] = result;
});
//获取录像文件夹列表或mp4文件列表