We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9d871c2 commit ede37d9Copy full SHA for ede37d9
src/plugins/output/fds/src/Storage.cpp
@@ -86,9 +86,10 @@ Storage::window_new(time_t ts)
86
void
87
Storage::window_close()
88
{
89
+ bool file_opened = (m_file.get() != nullptr);
90
m_file.reset();
91
m_session2params.clear();
- if (!m_file_name.empty()) {
92
+ if (file_opened) {
93
std::string new_file_name(m_file_name.begin(), m_file_name.end() - std::string(".tmp").size());
94
std::rename(m_file_name.c_str(), new_file_name.c_str());
95
m_file_name.clear();
0 commit comments