From 0b8291aaa92d8154af55fd36a7e95235497ed69c Mon Sep 17 00:00:00 2001 From: zhao1d Date: Mon, 11 Aug 2025 11:03:36 +0800 Subject: [PATCH] Code synchronization Issue: https://gitee.com/openharmony/arkcompiler_ets_runtime/issues/ICSAHK Signed-off-by: zhao1d Change-Id: I28ec5ca5f671c66ca9184d1af4dd9e44e5d75095 --- ecmascript/snapshot/mem/snapshot.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/ecmascript/snapshot/mem/snapshot.cpp b/ecmascript/snapshot/mem/snapshot.cpp index ac357f2a5b..33743b2f06 100644 --- a/ecmascript/snapshot/mem/snapshot.cpp +++ b/ecmascript/snapshot/mem/snapshot.cpp @@ -206,11 +206,9 @@ bool Snapshot::Deserialize(SnapshotType type, const CString &snapshotFile, bool UNREACHABLE(); } - std::ifstream file(realPath); - if (!file.good()) { + if (!FileExist(realPath.c_str())) { return false; } - file.close(); SnapshotProcessor processor(vm_); if (isBuiltins) { -- Gitee