mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-20 15:19:07 +01:00
Merge pull request #5513
856e862namespace: drop most boost namespaces and a few header cleanups (Cory Fields)9b1ab86namespace: drop boost::assign altogether here (Cory Fields)a324199namespace: remove boost namespace pollution (Cory Fields)
This commit is contained in:
@@ -18,7 +18,6 @@
|
||||
#include <boost/scoped_ptr.hpp>
|
||||
#include <boost/thread.hpp>
|
||||
|
||||
using namespace boost;
|
||||
using namespace std;
|
||||
|
||||
static uint64_t nAccountingEntryNumber = 0;
|
||||
@@ -865,20 +864,20 @@ bool BackupWallet(const CWallet& wallet, const string& strDest)
|
||||
bitdb.mapFileUseCount.erase(wallet.strWalletFile);
|
||||
|
||||
// Copy wallet.dat
|
||||
filesystem::path pathSrc = GetDataDir() / wallet.strWalletFile;
|
||||
filesystem::path pathDest(strDest);
|
||||
if (filesystem::is_directory(pathDest))
|
||||
boost::filesystem::path pathSrc = GetDataDir() / wallet.strWalletFile;
|
||||
boost::filesystem::path pathDest(strDest);
|
||||
if (boost::filesystem::is_directory(pathDest))
|
||||
pathDest /= wallet.strWalletFile;
|
||||
|
||||
try {
|
||||
#if BOOST_VERSION >= 104000
|
||||
filesystem::copy_file(pathSrc, pathDest, filesystem::copy_option::overwrite_if_exists);
|
||||
boost::filesystem::copy_file(pathSrc, pathDest, boost::filesystem::copy_option::overwrite_if_exists);
|
||||
#else
|
||||
filesystem::copy_file(pathSrc, pathDest);
|
||||
boost::filesystem::copy_file(pathSrc, pathDest);
|
||||
#endif
|
||||
LogPrintf("copied wallet.dat to %s\n", pathDest.string());
|
||||
return true;
|
||||
} catch (const filesystem::filesystem_error& e) {
|
||||
} catch (const boost::filesystem::filesystem_error& e) {
|
||||
LogPrintf("error copying wallet.dat to %s - %s\n", pathDest.string(), e.what());
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user