fix bug: logging: no ends_with in c++17

This commit is contained in:
jie 2021-10-22 12:24:24 +08:00
parent ed61b702f6
commit 5202449f0a
1 changed files with 1 additions and 1 deletions

View File

@ -33,7 +33,7 @@ namespace bserv {
inline void init_logging(const server_config& config) {
if (config.get_log_path() != "") {
std::string filename = config.get_log_path();
if (!filename.ends_with('/')) {
if (filename[filename.size() - 1] != '/') {
filename += '/';
}
filename += config.get_name();