File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed
Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change 77 * For a full list of authors see the git log.
88 */
99
10- #include " logging.hpp"
1110#include " node-persistent-cache.hpp"
1211
12+ #include " logging.hpp"
13+
1314#include < cassert>
1415#include < cerrno>
16+ #include < filesystem>
1517#include < system_error>
1618#include < utility>
1719
@@ -55,9 +57,14 @@ node_persistent_cache::~node_persistent_cache() noexcept
5557 if (m_remove_file) {
5658 try {
5759 log_debug (" Removing persistent node cache at '{}'." , m_file_name);
60+ std::error_code ec{};
61+ std::filesystem::remove (m_file_name, ec);
62+ if (ec) {
63+ log_warn (" Failed to remove persistent node cache at '{}': {}." ,
64+ m_file_name, ec.message ());
65+ }
5866 } catch (...) {
5967 // exception ignored on purpose
6068 }
61- unlink (m_file_name.c_str ());
6269 }
6370}
You can’t perform that action at this time.
0 commit comments