From 0c0d4090182aa41feeee9f2b264a3e3c2b2fc712 Mon Sep 17 00:00:00 2001 From: =?utf8?q?=EC=9D=B4=ED=98=95=EC=A3=BC/Common=20Platform=20Lab=28SR=29?= =?utf8?q?/=EC=82=BC=EC=84=B1=EC=A0=84=EC=9E=90?= Date: Thu, 15 Sep 2022 13:54:47 +0900 Subject: [PATCH] Fix dll filter in doAOTList (#433) --- NativeLauncher/tool/ni_common.cc | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/NativeLauncher/tool/ni_common.cc b/NativeLauncher/tool/ni_common.cc index cecda2a..4796ad3 100644 --- a/NativeLauncher/tool/ni_common.cc +++ b/NativeLauncher/tool/ni_common.cc @@ -189,7 +189,7 @@ static bool isTPADll(const std::string& dllPath) /** * @brief create the directory including parents directory, and - * copy ownership and smack labels to the created directory. + * copy ownership and smack labels to the created directory. * @param[in] target directory path * @param[in] source directory path to get ownership and smack label * @return if directory created successfully, return true otherwise false @@ -683,24 +683,21 @@ static ni_error_e doAOTList(std::vector& dllList, const std::string std::string coreLib = concatPath(__pm->getRuntimePath(), "System.Private.CoreLib.dll"); bool hasSPC = false; - std::vector niList; for (auto it = dllList.begin(); it != dllList.end(); it++) { std::string f = *it; if (!isFile(f)) { _SERR("dll file is not exist : %s", f.c_str()); dllList.erase(it--); } - if (!isManagedAssembly(f)) { + else if (!isManagedAssembly(f)) { _SERR("Input file is not a dll file : %s", f.c_str()); dllList.erase(it--); } // handle System.Private.CoreLib.dll separately. // dllList and path manager contain absolute path. So, there is no need to change path to absolute path - if (f == coreLib) { + else if (f == coreLib) { hasSPC = true; dllList.erase(it--); - } else { - niList.push_back(changeExtension(f, ".dll", ".ni.dll")); } } -- 2.7.4