mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-20 23:29:12 +01:00
Move boost/std fstream to fsbridge
This commit is contained in:
@@ -12,8 +12,6 @@
|
||||
#include <utiltime.h>
|
||||
#include <version.h>
|
||||
|
||||
#include <fstream>
|
||||
|
||||
/**
|
||||
* JSON-RPC protocol. Bitcoin speaks version 1.0 for maximum compatibility,
|
||||
* but uses JSON-RPC 1.1/2.0 standards for parts of the 1.0 standard that were
|
||||
@@ -85,9 +83,9 @@ bool GenerateAuthCookie(std::string *cookie_out)
|
||||
/** the umask determines what permissions are used to create this file -
|
||||
* these are set to 077 in init.cpp unless overridden with -sysperms.
|
||||
*/
|
||||
std::ofstream file;
|
||||
fsbridge::ofstream file;
|
||||
fs::path filepath_tmp = GetAuthCookieFile(true);
|
||||
file.open(filepath_tmp.string().c_str());
|
||||
file.open(filepath_tmp);
|
||||
if (!file.is_open()) {
|
||||
LogPrintf("Unable to open cookie authentication file %s for writing\n", filepath_tmp.string());
|
||||
return false;
|
||||
@@ -109,10 +107,10 @@ bool GenerateAuthCookie(std::string *cookie_out)
|
||||
|
||||
bool GetAuthCookie(std::string *cookie_out)
|
||||
{
|
||||
std::ifstream file;
|
||||
fsbridge::ifstream file;
|
||||
std::string cookie;
|
||||
fs::path filepath = GetAuthCookieFile();
|
||||
file.open(filepath.string().c_str());
|
||||
file.open(filepath);
|
||||
if (!file.is_open())
|
||||
return false;
|
||||
std::getline(file, cookie);
|
||||
|
||||
Reference in New Issue
Block a user