From 70ff5e7ea2efb47aceb6714c366b2d9774432027 Mon Sep 17 00:00:00 2001 From: Matthew Date: Tue, 25 Feb 2025 13:33:47 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E9=94=99=E8=AF=AF=E5=A4=84?= =?UTF-8?q?=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/src/main/cpp/PhoneDevice.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/app/src/main/cpp/PhoneDevice.cpp b/app/src/main/cpp/PhoneDevice.cpp index 495fe5aa..012eb1a2 100644 --- a/app/src/main/cpp/PhoneDevice.cpp +++ b/app/src/main/cpp/PhoneDevice.cpp @@ -3683,6 +3683,16 @@ bool CPhoneDevice::PostProcessPhoto(const PHOTO_INFO& photoInfo, const vector 0*/) { res = (rename(tmpPath.c_str(), fullPath.c_str()) == 0); + if (res) + { + imgFileSize = getFileSize(tmpPath); + if (imgFileSize == 0) + { + XYLOG(XYLOG_SEVERITY_ERROR, "Empty File after rename %s", fullPath.c_str() + m_appPath.size()); + res = false; + } + } + } #else bool res = cv::imwrite(fullPath.c_str(), mat, params);