!36884 Fix: 安全告警修正back

Merge pull request !36884 from yangziyong/codecheck_0703
This commit is contained in:
openharmony_ci 2024-07-04 13:01:01 +00:00 committed by Gitee
commit 4998dab6eb
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -290,8 +290,6 @@ void PixelMapOhos::SavePixelMapToFile(const std::string& dst) const
"_rowStride" + std::to_string(rowStride) + "_byteCount" + std::to_string(totalSize) + dst +
".dat";
auto path = ImageFileCache::GetInstance().ConstructCacheFilePath(filename);
char realPath[PATH_MAX] = { 0x00 };
CHECK_NULL_VOID(realpath(path.c_str(), realPath));
std::ofstream outFile(path, std::fstream::out);
if (!outFile.is_open()) {
TAG_LOGW(AceLogTag::ACE_IMAGE, "write error, path=%{public}s", path.c_str());