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);