From b40823154be50f307179ff19a095411de4b864f1 Mon Sep 17 00:00:00 2001 From: MarcoFalke Date: Wed, 15 Aug 2018 11:07:34 -0400 Subject: [PATCH] Merge #13982: refactor: use fs:: over boost::filesystem:: 4b3b85c597 refactor: use fs:: over boost::filesystem:: (fanquake) Pull request description: Noticed while investigating #13973. Tree-SHA512: 20a764d2ff460883fa0fd543c0a51031a9a202b40cfda9943f9995d3108c0a8296a3982b63bbd069167f73a1855003304a83df466763032ce7339b08b3a97d4b # Conflicts: # src/qt/guiutil.cpp --- src/logging.cpp | 2 +- src/wallet/rpcdump.cpp | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/logging.cpp b/src/logging.cpp index db0a4c043b..7bb1807ac0 100644 --- a/src/logging.cpp +++ b/src/logging.cpp @@ -303,7 +303,7 @@ void BCLog::Logger::ShrinkDebugFile() size_t log_size = 0; try { log_size = fs::file_size(m_file_path); - } catch (boost::filesystem::filesystem_error &) {} + } catch (const fs::filesystem_error&) {} // If debug.log file is more than 10% bigger the RECENT_DEBUG_HISTORY_SIZE // trim it down by saving only the last RECENT_DEBUG_HISTORY_SIZE bytes diff --git a/src/wallet/rpcdump.cpp b/src/wallet/rpcdump.cpp index 7f9d4ee7f0..3d8f7d54f1 100644 --- a/src/wallet/rpcdump.cpp +++ b/src/wallet/rpcdump.cpp @@ -874,15 +874,15 @@ UniValue dumpwallet(const JSONRPCRequest& request) EnsureWalletIsUnlocked(pwallet); - boost::filesystem::path filepath = request.params[0].get_str(); - filepath = boost::filesystem::absolute(filepath); + fs::path filepath = request.params[0].get_str(); + filepath = fs::absolute(filepath); /* Prevent arbitrary files from being overwritten. There have been reports * that users have overwritten wallet files this way: * https://github.com/bitcoin/bitcoin/issues/9934 * It may also avoid other security issues. */ - if (boost::filesystem::exists(filepath)) { + if (fs::exists(filepath)) { throw JSONRPCError(RPC_INVALID_PARAMETER, filepath.string() + " already exists. If you are sure this is what you want, move it out of the way first"); }