From be685337b12ece5533df65d78a5bb8a6926c5745 Mon Sep 17 00:00:00 2001 From: Erik Date: Thu, 12 Apr 2018 10:01:02 +0500 Subject: [PATCH] Update file_sinks.h Removed possible throw of an exception from the destructor --- include/spdlog/sinks/file_sinks.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/include/spdlog/sinks/file_sinks.h b/include/spdlog/sinks/file_sinks.h index 13282789..73724d23 100644 --- a/include/spdlog/sinks/file_sinks.h +++ b/include/spdlog/sinks/file_sinks.h @@ -289,7 +289,12 @@ public: ~step_file_sink() { - close_current_file(); + using details::os::filename_to_str; + + filename_t src =_current_filename; + filename_t target = _current_filename + _ext; + + details::os::rename(src, target); } protected: