aboutsummaryrefslogtreecommitdiff
path: root/src/qt
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2018-10-18 10:36:25 +0200
committerWladimir J. van der Laan <laanwj@gmail.com>2018-10-18 10:36:51 +0200
commit9c5f0d542d1db507b3b9c87bd9de6d0d758d51c1 (patch)
treef0d1002150736e11c1ce7639fe5a9e0093192e77 /src/qt
parent041224a75c16a2c181ca2305d12b63396e60d922 (diff)
parent43c7fbb1e79a4a2219306bf3da1a2dfdf9213f2c (diff)
downloadbitcoin-9c5f0d542d1db507b3b9c87bd9de6d0d758d51c1.tar.xz
Merge #13878: utils: Add fstream wrapper to allow to pass unicode filename on Windows
43c7fbb1e79a4a2219306bf3da1a2dfdf9213f2c Make MSVC compiler read the source code using utf-8 (Chun Kuan Lee) f86a571edb9627c126b9ccd7da68bd7d1657b8f8 tests: Add test case for std::ios_base::ate (Chun Kuan Lee) a554cc901a32f41162089d6b20ad39d5aeff0583 Move boost/std fstream to fsbridge (Chun Kuan Lee) 86eb3b3f1ab594142b6baa9576717ff121f3b745 utils: Add fsbridge fstream function wrapper (Chun Kuan Lee) Pull request description: If compiled with mingw, use glibc++ extension `stdio_filebuf` to open the file by `FILE*` instead of filename. In other condition, we can use boost::fstream. Tree-SHA512: b5dbd83e347fb9b2a0c8b1c2c7bd71a272e839ec0617883b2a0ec12506ae9e825373cf6e95b9bcc91d7edc85bf51580a7716b56a9ecaad776bc3ae61638cb3da
Diffstat (limited to 'src/qt')
-rw-r--r--src/qt/guiutil.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/qt/guiutil.cpp b/src/qt/guiutil.cpp
index b894fc8166..5f6af61a70 100644
--- a/src/qt/guiutil.cpp
+++ b/src/qt/guiutil.cpp
@@ -367,7 +367,7 @@ bool openBitcoinConf()
fs::path pathConfig = GetConfigFile(gArgs.GetArg("-conf", BITCOIN_CONF_FILENAME));
/* Create the file */
- fs::ofstream configFile(pathConfig, std::ios_base::app);
+ fsbridge::ofstream configFile(pathConfig, std::ios_base::app);
if (!configFile.good())
return false;
@@ -611,7 +611,7 @@ fs::path static GetAutostartFilePath()
bool GetStartOnSystemStartup()
{
- fs::ifstream optionFile(GetAutostartFilePath());
+ fsbridge::ifstream optionFile(GetAutostartFilePath());
if (!optionFile.good())
return false;
// Scan through file for "Hidden=true":
@@ -642,7 +642,7 @@ bool SetStartOnSystemStartup(bool fAutoStart)
fs::create_directories(GetAutostartDir());
- fs::ofstream optionFile(GetAutostartFilePath(), std::ios_base::out|std::ios_base::trunc);
+ fsbridge::ofstream optionFile(GetAutostartFilePath(), std::ios_base::out | std::ios_base::trunc);
if (!optionFile.good())
return false;
std::string chain = gArgs.GetChainName();