diff --git a/src/logging/writers/ascii/Ascii.cc b/src/logging/writers/ascii/Ascii.cc index 8a703331e2..13b9711b86 100644 --- a/src/logging/writers/ascii/Ascii.cc +++ b/src/logging/writers/ascii/Ascii.cc @@ -88,7 +88,7 @@ struct LeftoverLog * Return the "path" (logging framework parlance) of the log without the * directory or file extension. E.g. the "path" of "logs/conn.log" is just "conn". */ - std::string Path() const { return zeek::filesystem::path(filename).stem(); } + std::string Path() const { return zeek::filesystem::path(filename).stem().string(); } /** * Deletes the shadow file and returns whether it succeeded. @@ -493,7 +493,7 @@ bool Ascii::DoInit(const WriterInfo& info, int num_fields, const threading::Fiel } if ( fname.front() != '/' && ! logdir.empty() ) - fname = zeek::filesystem::path(logdir) / fname; + fname = (zeek::filesystem::path(logdir) / fname).string(); fname += ext; @@ -773,7 +773,7 @@ static std::vector find_leftover_logs() if ( BifConst::LogAscii::logdir->Len() > 0 ) logdir = zeek::filesystem::absolute(BifConst::LogAscii::logdir->ToStdString()); - auto d = opendir(logdir.c_str()); + auto d = opendir(logdir.string().c_str()); struct dirent* dp; if ( ! d ) @@ -788,8 +788,8 @@ static std::vector find_leftover_logs() if ( strncmp(dp->d_name, shadow_file_prefix, prefix_len) != 0 ) continue; - std::string shadow_fname = logdir / dp->d_name; - std::string log_fname = logdir / (dp->d_name + prefix_len); + std::string shadow_fname = (logdir / dp->d_name).string(); + std::string log_fname = (logdir / (dp->d_name + prefix_len)).string(); if ( util::is_file(log_fname) ) { diff --git a/src/logging/writers/sqlite/SQLite.cc b/src/logging/writers/sqlite/SQLite.cc index f92c3f6e74..9eee5596e9 100644 --- a/src/logging/writers/sqlite/SQLite.cc +++ b/src/logging/writers/sqlite/SQLite.cc @@ -147,7 +147,7 @@ bool SQLite::DoInit(const WriterInfo& info, int arg_num_fields, const Field* con tablename = it->second; if ( checkError(sqlite3_open_v2( - fullpath.c_str(), &db, + fullpath.string().c_str(), &db, SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE | SQLITE_OPEN_NOMUTEX, NULL)) ) return false;