diff --git a/include/spdlog/sinks/daily_file_sink.h b/include/spdlog/sinks/daily_file_sink.h index de673932..294c81ac 100644 --- a/include/spdlog/sinks/daily_file_sink.h +++ b/include/spdlog/sinks/daily_file_sink.h @@ -105,14 +105,15 @@ protected: private: void init_filenames_q() { - using details::os::file_exists; + using details::os::path_exists; + filenames_q_ = details::circular_q(static_cast(max_files_)); std::vector filenames; auto now = log_clock::now(); while (filenames.size() < max_files_) { auto filename = FileNameCalc::calc_filename(base_filename_, now_tm(now)); - if (!file_exists(filename)) + if (!path_exists(filename)) { break; }