Check library extension more
[platform/core/dotnet/launcher.git] / NativeLauncher / tool / tac_common.cc
index 2824a37..71623b3 100644 (file)
@@ -425,7 +425,7 @@ std::vector<std::string> depsJsonParser(const std::string& rootPath, const std::
                                ifs.close();
                        }
                }
-       } catch (const Json::LogicError& error) {
+       } catch (const Json::Exception& error) {
                _ERR("Failed to parse Json: %s", error.what());
        }
        return parserData;
@@ -439,7 +439,7 @@ std::vector<std::string> getLibrariesInfo(const std::string& rootPath)
                return LibrariesInfo;
 
        auto convert = [&LibrariesInfo](const std::string& filepath, const std::string& filename) {
-               if (filepath.rfind(".so") != std::string::npos) {
+               if (filename.find(".so", filename.size() - 3) != std::string::npos || filepath.rfind(".so.") != std::string::npos) {
                        std::string buffer = SHA256(filepath);
                        LibrariesInfo.push_back(filepath + ":" + buffer);
                        _INFO("Library : [%s] / SHA256 : [%s]", filename.c_str(), buffer.c_str());