From 58c64b8c0d0a2cc6d19110dff0c28dbc2cccc34a Mon Sep 17 00:00:00 2001 From: Matthew Date: Sun, 7 Jul 2024 17:34:42 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E6=96=87=E4=BB=B6=E5=88=A4?= =?UTF-8?q?=E6=96=AD=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/src/main/cpp/PhoneDevice.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/src/main/cpp/PhoneDevice.cpp b/app/src/main/cpp/PhoneDevice.cpp index 6d5a99ac..daaa2d0d 100644 --- a/app/src/main/cpp/PhoneDevice.cpp +++ b/app/src/main/cpp/PhoneDevice.cpp @@ -270,7 +270,8 @@ void CPhoneDevice::SetRecognizationCfg(const IDevice::CFG_RECOGNIZATION* pRecogn // TODO std::string paramFile = m_appPath + (APP_PATH_RECOG_PARAM); std::string binFile = m_appPath + (APP_PATH_RECOG_BIN); - if (existsFile(paramFile) || !existsFile(binFile)) + std::error_code err; + if (!existsFile(paramFile) || !existsFile(binFile) || fs::is_directory(fs::path(paramFile), err) || fs::is_directory(fs::path(binFile), err)) { XYLOG(XYLOG_SEVERITY_WARNING, "AI Config Files are invalid"); }