diff --git a/interfaces/innerkits/form_manager/src/form_provider_data.cpp b/interfaces/innerkits/form_manager/src/form_provider_data.cpp index 36b61be791a59ee5a12375ab9e12e9bca2df6480..da96cab7fa96772f6529ee2b907e1cd2e98a8c87 100755 --- a/interfaces/innerkits/form_manager/src/form_provider_data.cpp +++ b/interfaces/innerkits/form_manager/src/form_provider_data.cpp @@ -128,7 +128,7 @@ void FormProviderData::AddImageData(std::string picName, int fd) } int32_t size = lseek(fd, 0L, SEEK_END); - if (size == -1) { + if (size <= 0) { HILOG_ERROR("Get file size failed, errno is %{public}d", errno); return; }