diff --git a/programs/server/Server.cpp b/programs/server/Server.cpp index 574e9bfa62e..4e9b74a5077 100644 --- a/programs/server/Server.cpp +++ b/programs/server/Server.cpp @@ -748,8 +748,8 @@ try else { const String config_path = config().getString("config-file", "config.xml"); - const auto config_dir = std::filesystem::path{config_path}.remove_filename(); - setenv("OPENSSL_CONF", config_dir.string() + "openssl.conf", true); + const auto config_dir = std::filesystem::path{config_path}.replace_filename("openssl.conf"); + setenv("OPENSSL_CONF", config_dir.string(), true); } #endif