File tree 4 files changed +12
-5
lines changed
4 files changed +12
-5
lines changed Original file line number Diff line number Diff line change @@ -73,7 +73,7 @@ static const std::string COOKIEAUTH_FILE = ".cookie";
73
73
fs::path GetAuthCookieFile ()
74
74
{
75
75
fs::path path (GetArg (" -rpccookiefile" , COOKIEAUTH_FILE));
76
- if (!path.is_complete ()) path = GetDataDir () / path;
76
+ if (!path.is_absolute ()) path = GetDataDir () / path;
77
77
return path;
78
78
}
79
79
Original file line number Diff line number Diff line change @@ -588,7 +588,7 @@ const fs::path &GetBackupDir()
588
588
fs::path GetConfigFile (const std::string& confPath)
589
589
{
590
590
fs::path pathConfigFile (confPath);
591
- if (!pathConfigFile.is_complete ())
591
+ if (!pathConfigFile.is_absolute ())
592
592
pathConfigFile = GetDataDir (false ) / pathConfigFile;
593
593
594
594
return pathConfigFile;
@@ -624,7 +624,7 @@ void ReadConfigFile(const std::string& confPath)
624
624
fs::path GetPidFile ()
625
625
{
626
626
fs::path pathPidFile (GetArg (" -pid" , BITCOIN_PID_FILENAME));
627
- if (!pathPidFile.is_complete ()) pathPidFile = GetDataDir () / pathPidFile;
627
+ if (!pathPidFile.is_absolute ()) pathPidFile = GetDataDir () / pathPidFile;
628
628
return pathPidFile;
629
629
}
630
630
Original file line number Diff line number Diff line change 23
23
24
24
#include < algorithm>
25
25
#include < exception>
26
+ #include < list>
26
27
#include < map>
27
28
#include < set>
28
29
#include < stdint.h>
Original file line number Diff line number Diff line change @@ -459,8 +459,10 @@ bool CWallet::Verify()
459
459
uiInterface.InitMessage (_ (" Verifying wallet..." ));
460
460
461
461
// Wallet file must be a plain filename without a directory
462
- if (walletFile != fs::basename (walletFile) + fs::extension (walletFile))
462
+ fs::path walletPath (walletFile);
463
+ if (walletFile != walletPath.stem ().string () + walletPath.extension ().string ()) {
463
464
return InitError (strprintf (_ (" Wallet %s resides outside data directory %s" ), walletFile, GetDataDir ().string ()));
465
+ }
464
466
465
467
if (!bitdb.Open (GetDataDir ()))
466
468
{
@@ -4019,7 +4021,11 @@ bool CWallet::BackupWallet(const std::string& strDest)
4019
4021
return false ;
4020
4022
}
4021
4023
4022
- #if BOOST_VERSION >= 104000
4024
+ #if BOOST_VERSION >= 107400
4025
+ // Boost 1.74.0 and up implements std++17 like "copy_options", and this
4026
+ // is the only remaining enum after 1.85.0
4027
+ fs::copy_file (pathSrc, pathDest, fs::copy_options::overwrite_existing);
4028
+ #elif BOOST_VERSION >= 104000
4023
4029
fs::copy_file (pathSrc, pathDest, fs::copy_option::overwrite_if_exists);
4024
4030
#else
4025
4031
fs::copy_file (pathSrc, pathDest);
You can’t perform that action at this time.
0 commit comments