более правильное решение issue96 и issue95
authorfsb4000 <fsb4000@yandex.ru>
Sat, 3 Jan 2015 23:13:35 +0000 (05:13 +0600)
committerfsb4000 <fsb4000@yandex.ru>
Sat, 3 Jan 2015 23:13:35 +0000 (05:13 +0600)
src/init.cpp

index e40f36b..cc66c3d 100644 (file)
@@ -28,7 +28,7 @@ using namespace boost;
 
 CWallet* pwalletMain;
 CClientUIInterface uiInterface;
-std::string strWalletFileName = "wallet.dat";
+std::string strWalletFileName;
 bool fConfChange;
 unsigned int nNodeLifespan;
 unsigned int nDerivationMethodIndex;
@@ -499,7 +499,7 @@ bool AppInit2()
     // ********************************************************* Step 4: application initialization: dir lock, daemonize, pidfile, debug log
 
     std::string strDataDir = GetDataDir().string();
-    std::string strWalletFileName = GetArg("-wallet", "wallet.dat");
+    strWalletFileName = GetArg("-wallet", "wallet.dat");
 
     // strWalletFileName must be a plain filename without a directory
     if (strWalletFileName != boost::filesystem::basename(strWalletFileName) + boost::filesystem::extension(strWalletFileName))