mirror of
https://github.com/dashpay/dash.git
synced 2024-12-26 04:22:55 +01:00
Wallet backup OS-dependent path fix
This commit is contained in:
parent
91bcad1d1f
commit
2b040d1e48
@ -729,9 +729,12 @@ bool AppInit2(boost::thread_group& threadGroup)
|
||||
if (filesystem::exists(backupDir))
|
||||
{
|
||||
std::string dateTimeStr = DateTimeStrFormat(".%Y-%m-%d-%H.%M", GetTime());
|
||||
std::string backupDirStr = backupDir.string() + boost::filesystem::path::preferred_separator + strWalletFile;
|
||||
std::string backupDirStr = backupDir.string();
|
||||
backupDirStr += "/" + strWalletFile;
|
||||
boost::filesystem::path sourceFile = strWalletFile;
|
||||
boost::filesystem::path backupFile = backupDirStr + dateTimeStr;
|
||||
backupFile.make_preferred();
|
||||
|
||||
try {
|
||||
boost::filesystem::copy_file(sourceFile, backupFile);
|
||||
LogPrintf("Creating backup of %s -> %s\n", sourceFile, backupFile);
|
||||
|
Loading…
Reference in New Issue
Block a user