diff --git a/src/bench/bench.h b/src/bench/bench.h index 12167a293a..5bd3311170 100644 --- a/src/bench/bench.h +++ b/src/bench/bench.h @@ -10,6 +10,7 @@ #include #include #include +#include #include #include diff --git a/src/rpc/protocol.cpp b/src/rpc/protocol.cpp index 6db357c2a0..7d517e3bb3 100644 --- a/src/rpc/protocol.cpp +++ b/src/rpc/protocol.cpp @@ -75,7 +75,7 @@ static fs::path GetAuthCookieFile(bool temp=false) arg += ".tmp"; } fs::path path(arg); - if (!path.is_complete()) path = GetDataDir() / path; + if (!path.is_absolute()) path = GetDataDir() / path; return path; } diff --git a/src/support/lockedpool.h b/src/support/lockedpool.h index e78791ca1b..7199bf25aa 100644 --- a/src/support/lockedpool.h +++ b/src/support/lockedpool.h @@ -11,6 +11,7 @@ #include #include #include +#include /** * OS-dependent allocation and deallocation of locked/pinned memory pages. diff --git a/src/test/cuckoocache_tests.cpp b/src/test/cuckoocache_tests.cpp index 1afa524bbc..03bada9ca7 100644 --- a/src/test/cuckoocache_tests.cpp +++ b/src/test/cuckoocache_tests.cpp @@ -8,6 +8,7 @@ #include "test/test_raven.h" #include "random.h" #include +#include /** Test Suite for CuckooCache * diff --git a/src/util.cpp b/src/util.cpp index 7542cc2d75..a5ed1ec0c3 100644 --- a/src/util.cpp +++ b/src/util.cpp @@ -620,7 +620,7 @@ void ClearDatadirCache() fs::path GetConfigFile(const std::string &confPath) { fs::path pathConfigFile(confPath); - if (!pathConfigFile.is_complete()) + if (!pathConfigFile.is_absolute()) pathConfigFile = GetDataDir(false) / pathConfigFile; return pathConfigFile; @@ -657,7 +657,7 @@ void ArgsManager::ReadConfigFile(const std::string &confPath) fs::path GetPidFile() { fs::path pathPidFile(gArgs.GetArg("-pid", RAVEN_PID_FILENAME)); - if (!pathPidFile.is_complete()) pathPidFile = GetDataDir() / pathPidFile; + if (!pathPidFile.is_absolute()) pathPidFile = GetDataDir() / pathPidFile; return pathPidFile; } diff --git a/src/wallet/db.cpp b/src/wallet/db.cpp index 26e0b1ca1e..3f553a1562 100644 --- a/src/wallet/db.cpp +++ b/src/wallet/db.cpp @@ -267,7 +267,7 @@ bool CDB::VerifyEnvironment(const std::string& walletFile, const fs::path& dataD LogPrintf("Using wallet %s\n", walletFile); // Wallet file must be a plain filename without a directory - if (walletFile != fs::basename(walletFile) + fs::extension(walletFile)) + if (walletFile != fs::path(walletFile).filename()) { errorStr = strprintf(_("Wallet %s resides outside data directory %s"), walletFile, dataDir.string()); return false; @@ -706,7 +706,7 @@ bool CWalletDBWrapper::Backup(const std::string& strDest) pathDest /= strFile; try { - fs::copy_file(pathSrc, pathDest, fs::copy_option::overwrite_if_exists); + fs::copy_file(pathSrc, pathDest, fs::copy_options::overwrite_existing); LogPrintf("copied %s to %s\n", strFile, pathDest.string()); return true; } catch (const fs::filesystem_error& e) {