|
43 | 43 | #include <boost/thread.hpp> |
44 | 44 | #include <openssl/crypto.h> |
45 | 45 |
|
46 | | -using namespace boost; |
47 | 46 | using namespace std; |
48 | 47 |
|
49 | 48 | #ifdef ENABLE_WALLET |
@@ -427,12 +426,12 @@ void ThreadImport(std::vector<boost::filesystem::path> vImportFiles) |
427 | 426 | } |
428 | 427 |
|
429 | 428 | // hardcoded $DATADIR/bootstrap.dat |
430 | | - filesystem::path pathBootstrap = GetDataDir() / "bootstrap.dat"; |
431 | | - if (filesystem::exists(pathBootstrap)) { |
| 429 | + boost::filesystem::path pathBootstrap = GetDataDir() / "bootstrap.dat"; |
| 430 | + if (boost::filesystem::exists(pathBootstrap)) { |
432 | 431 | FILE *file = fopen(pathBootstrap.string().c_str(), "rb"); |
433 | 432 | if (file) { |
434 | 433 | CImportingNow imp; |
435 | | - filesystem::path pathBootstrapOld = GetDataDir() / "bootstrap.dat.old"; |
| 434 | + boost::filesystem::path pathBootstrapOld = GetDataDir() / "bootstrap.dat.old"; |
436 | 435 | LogPrintf("Importing bootstrap.dat...\n"); |
437 | 436 | LoadExternalBlockFile(file); |
438 | 437 | RenameOver(pathBootstrap, pathBootstrapOld); |
@@ -816,7 +815,7 @@ bool AppInit2(boost::thread_group& threadGroup) |
816 | 815 | return false; |
817 | 816 | } |
818 | 817 |
|
819 | | - if (filesystem::exists(GetDataDir() / strWalletFile)) |
| 818 | + if (boost::filesystem::exists(GetDataDir() / strWalletFile)) |
820 | 819 | { |
821 | 820 | CDBEnv::VerifyResult r = bitdb.Verify(strWalletFile, CWalletDB::Recover); |
822 | 821 | if (r == CDBEnv::RECOVER_OK) |
@@ -937,20 +936,20 @@ bool AppInit2(boost::thread_group& threadGroup) |
937 | 936 | fReindex = GetBoolArg("-reindex", false); |
938 | 937 |
|
939 | 938 | // Upgrading to 0.8; hard-link the old blknnnn.dat files into /blocks/ |
940 | | - filesystem::path blocksDir = GetDataDir() / "blocks"; |
941 | | - if (!filesystem::exists(blocksDir)) |
| 939 | + boost::filesystem::path blocksDir = GetDataDir() / "blocks"; |
| 940 | + if (!boost::filesystem::exists(blocksDir)) |
942 | 941 | { |
943 | | - filesystem::create_directories(blocksDir); |
| 942 | + boost::filesystem::create_directories(blocksDir); |
944 | 943 | bool linked = false; |
945 | 944 | for (unsigned int i = 1; i < 10000; i++) { |
946 | | - filesystem::path source = GetDataDir() / strprintf("blk%04u.dat", i); |
947 | | - if (!filesystem::exists(source)) break; |
948 | | - filesystem::path dest = blocksDir / strprintf("blk%05u.dat", i-1); |
| 945 | + boost::filesystem::path source = GetDataDir() / strprintf("blk%04u.dat", i); |
| 946 | + if (!boost::filesystem::exists(source)) break; |
| 947 | + boost::filesystem::path dest = blocksDir / strprintf("blk%05u.dat", i-1); |
949 | 948 | try { |
950 | | - filesystem::create_hard_link(source, dest); |
| 949 | + boost::filesystem::create_hard_link(source, dest); |
951 | 950 | LogPrintf("Hardlinked %s -> %s\n", source.string(), dest.string()); |
952 | 951 | linked = true; |
953 | | - } catch (const filesystem::filesystem_error& e) { |
| 952 | + } catch (const boost::filesystem::filesystem_error& e) { |
954 | 953 | // Note: hardlink creation failing is not a disaster, it just means |
955 | 954 | // blocks will get re-downloaded from peers. |
956 | 955 | LogPrintf("Error hardlinking blk%04u.dat : %s\n", i, e.what()); |
|
0 commit comments