use ends_with to recognize .i2p addresses

This commit is contained in:
orignal
2025-03-08 16:03:36 -05:00
parent b500374f74
commit 4d9b5e685d
2 changed files with 30 additions and 19 deletions

View File

@@ -547,7 +547,11 @@ namespace client
{
for (auto& it: files)
{
#if __cplusplus >= 202002L // C++20
if (!it.ends_with (".conf")) continue;
#else
if (it.substr(it.size() - 5) != ".conf") continue; // skip files which not ends with ".conf"
#endif
LogPrint(eLogDebug, "Clients: Tunnels extra config file: ", it);
ReadTunnels (it, numClientTunnels, numServerTunnels);
}