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
commit 024c3e1a28
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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文件列表