| 987 | } |
| 988 | |
| 989 | void Server::processScanResults(int id, std::set<String>& newBlacklistedPlugins) { |
| 990 | File cacheFile(Defaults::getConfigFileName(Defaults::ConfigPluginCache, {{"id", String(id)}})); |
| 991 | File layoutsFile(Defaults::getConfigFileName(Defaults::PluginLayouts, {{"id", String(id)}})); |
| 992 | File deadmanFile(Defaults::getConfigFileName(Defaults::ConfigDeadMan, {{"id", String(id)}})); |
| 993 | |
| 994 | if (cacheFile.existsAsFile()) { |
| 995 | KnownPluginList plist; |
| 996 | json playouts; |
| 997 | loadKnownPluginList(plist, playouts, id); |
| 998 | |
| 999 | for (auto& p : plist.getBlacklistedFiles()) { |
| 1000 | if (!m_pluginList.getBlacklistedFiles().contains(p)) { |
| 1001 | m_pluginList.addToBlacklist(p); |
| 1002 | newBlacklistedPlugins.insert(getPluginName(p)); |
| 1003 | } |
| 1004 | } |
| 1005 | |
| 1006 | for (auto p : plist.getTypes()) { |
| 1007 | m_pluginList.addType(p); |
| 1008 | } |
| 1009 | |
| 1010 | for (auto it = playouts.begin(); it != playouts.end(); it++) { |
| 1011 | m_jpluginLayouts[it.key()] = it.value(); |
| 1012 | } |
| 1013 | |
| 1014 | cacheFile.deleteFile(); |
| 1015 | layoutsFile.deleteFile(); |
| 1016 | } |
| 1017 | |
| 1018 | if (deadmanFile.existsAsFile()) { |
| 1019 | logln("reading scan crash file " << deadmanFile.getFullPathName()); |
| 1020 | |
| 1021 | StringArray lines; |
| 1022 | deadmanFile.readLines(lines); |
| 1023 | |
| 1024 | for (auto& line : lines) { |
| 1025 | newBlacklistedPlugins.insert(getPluginName(line)); |
| 1026 | } |
| 1027 | |
| 1028 | deadmanFile.deleteFile(); |
| 1029 | } |
| 1030 | } |
| 1031 | |
| 1032 | void Server::run() { |
| 1033 | switch (m_sandboxModeRuntime) { |
nothing calls this directly
no test coverage detected