diff options
| author | fanquake <[email protected]> | 2018-08-15 21:05:21 +0800 |
|---|---|---|
| committer | fanquake <[email protected]> | 2018-08-15 21:05:21 +0800 |
| commit | 4b3b85c597a2d4139ecaa6b78b2fa9c89be3319f (patch) | |
| tree | f143a7896985d040dc9dcf6f99001d221a816d3c /src | |
| parent | Merge #13974: [trivial] Fix typo in CDiskBlockPos struct's ToString (diff) | |
| download | discoin-4b3b85c597a2d4139ecaa6b78b2fa9c89be3319f.tar.xz discoin-4b3b85c597a2d4139ecaa6b78b2fa9c89be3319f.zip | |
refactor: use fs:: over boost::filesystem::
Diffstat (limited to 'src')
| -rw-r--r-- | src/logging.cpp | 2 | ||||
| -rw-r--r-- | src/qt/guiutil.cpp | 4 | ||||
| -rw-r--r-- | src/wallet/rpcdump.cpp | 6 |
3 files changed, 6 insertions, 6 deletions
diff --git a/src/logging.cpp b/src/logging.cpp index e8e22cbf9..6557dddff 100644 --- a/src/logging.cpp +++ b/src/logging.cpp @@ -245,7 +245,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/qt/guiutil.cpp b/src/qt/guiutil.cpp index f8f031041..f8391b630 100644 --- a/src/qt/guiutil.cpp +++ b/src/qt/guiutil.cpp @@ -368,10 +368,10 @@ void openDebugLogfile() bool openBitcoinConf() { - boost::filesystem::path pathConfig = GetConfigFile(gArgs.GetArg("-conf", BITCOIN_CONF_FILENAME)); + fs::path pathConfig = GetConfigFile(gArgs.GetArg("-conf", BITCOIN_CONF_FILENAME)); /* Create the file */ - boost::filesystem::ofstream configFile(pathConfig, std::ios_base::app); + fs::ofstream configFile(pathConfig, std::ios_base::app); if (!configFile.good()) return false; diff --git a/src/wallet/rpcdump.cpp b/src/wallet/rpcdump.cpp index 5800e7582..7cb41da39 100644 --- a/src/wallet/rpcdump.cpp +++ b/src/wallet/rpcdump.cpp @@ -706,15 +706,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"); } |