From 73d2cd4ff716efb704bc65815708d45eab3d4f09 Mon Sep 17 00:00:00 2001 From: Dw9 Date: Thu, 4 Aug 2022 22:00:44 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dpr1885=20=E5=88=A0=E9=99=A4?= =?UTF-8?q?=E6=96=87=E4=BB=B6=E5=88=A4=E6=96=AD=E9=80=BB=E8=BE=91=E9=94=99?= =?UTF-8?q?=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/WebApi.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/server/WebApi.cpp b/server/WebApi.cpp index bd72ffc1..29419257 100755 --- a/server/WebApi.cpp +++ b/server/WebApi.cpp @@ -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文件列表