From: j-h.choi Date: Wed, 8 Jan 2025 08:22:23 +0000 (+0900) Subject: Modified to check extensions when deleting native image files X-Git-Tag: accepted/tizen/unified/20250115.124144~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=151328063c5bb71f94da1b2c2005afe43aefb5b5;p=platform%2Fcore%2Fdotnet%2Flauncher.git Modified to check extensions when deleting native image files Change-Id: Ia4442d953a3c27db3679c5d20be108a208669551 --- diff --git a/NativeLauncher/tool/ni_common.cc b/NativeLauncher/tool/ni_common.cc index 3754715..4d2e3d2 100644 --- a/NativeLauncher/tool/ni_common.cc +++ b/NativeLauncher/tool/ni_common.cc @@ -1183,7 +1183,8 @@ void removeNIPlatform() void removeNIUnderDirs(const std::string& rootPaths) { auto convert = [](const std::string& path, const std::string& filename) { - if (isR2RImage(path)) { + //The .ni.dll file can be renamed .dll. + if (isR2RImage(path) && isNativeImage(path)) { std::string assemblyPath = changeExtension(path, ".ni.dll", ".dll"); if (exist(assemblyPath)) { if (remove(path.c_str())) { @@ -1205,7 +1206,8 @@ void removeNIUnderDirs(const std::string& rootPaths) static void removeNIUnderTAC(const std::string& rootPaths) { auto convert = [&rootPaths](const std::string& path, const std::string& filename) { - if (isNativeImage(path)) { + //The .ni.dll file can be renamed .dll. + if (isR2RImage(path) && isNativeImage(path)) { std::string assemblyPath = changeExtension(path, ".ni.dll", ".dll"); if (exist(assemblyPath)) { if (removeFile(assemblyPath)) {