From f1e1fb4bdef878c8fc1564fa418d44e7541a7e83 Mon Sep 17 00:00:00 2001 From: s_nakamoto Date: Tue, 7 Sep 2010 01:12:53 +0000 Subject: cleanup, catch some recoverable exceptions and continue git-svn-id: https://bitcoin.svn.sourceforge.net/svnroot/bitcoin/trunk@148 1a98c847-1fd6-4fd8-948a-caf3550aa51b --- db.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'db.cpp') diff --git a/db.cpp b/db.cpp index 56ec9ee6ee..6b3af25798 100644 --- a/db.cpp +++ b/db.cpp @@ -820,10 +820,15 @@ void BackupWallet(const string& strDest) mapFileUseCount.erase(strFile); // Copy wallet.dat + filesystem::path pathSrc(GetDataDir() + "/" + strFile); filesystem::path pathDest(strDest); if (filesystem::is_directory(pathDest)) pathDest = pathDest / strFile; - filesystem::copy_file(filesystem::path(GetDataDir() + "/" + strFile), pathDest, filesystem::copy_option::overwrite_if_exists); +#if BOOST_VERSION >= 104000 + filesystem::copy_file(pathSrc, pathDest, filesystem::copy_option::overwrite_if_exists); +#else + filesystem::copy_file(pathSrc, pathDest); +#endif printf("copied wallet.dat to %s\n", pathDest.string().c_str()); return; -- cgit v1.2.3