clang format

This commit is contained in:
gabime
2018-07-10 23:53:00 +03:00
parent d409e5367b
commit 16ee72da7c
8 changed files with 200 additions and 204 deletions

View File

@@ -95,14 +95,15 @@ private:
}
if (details::file_helper::file_exists(src) && details::os::rename(src, target) != 0)
{
// if failed try again after small delay.
// this is a workaround to a windows issue, where very high rotation rates sometimes fail (because of antivirus?).
details::os::sleep_for_millis(20);
details::os::remove(target);
if (details::os::rename(src, target) != 0)
{
throw spdlog_ex("rotating_file_sink: failed renaming " + filename_to_str(src) + " to " + filename_to_str(target), errno);
}
// if failed try again after small delay.
// this is a workaround to a windows issue, where very high rotation rates sometimes fail (because of antivirus?).
details::os::sleep_for_millis(20);
details::os::remove(target);
if (details::os::rename(src, target) != 0)
{
throw spdlog_ex(
"rotating_file_sink: failed renaming " + filename_to_str(src) + " to " + filename_to_str(target), errno);
}
}
}
file_helper_.reopen(true);