mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-11 06:28:31 +01:00
wallet: Use fsbridge::ifstream to fix Windows path issue
This commit is contained in:
@@ -160,6 +160,7 @@ static std::string openmodeToStr(std::ios_base::openmode mode)
|
||||
void ifstream::open(const fs::path& p, std::ios_base::openmode mode)
|
||||
{
|
||||
close();
|
||||
mode |= std::ios_base::in;
|
||||
m_file = fsbridge::fopen(p, openmodeToStr(mode).c_str());
|
||||
if (m_file == nullptr) {
|
||||
return;
|
||||
@@ -183,6 +184,7 @@ void ifstream::close()
|
||||
void ofstream::open(const fs::path& p, std::ios_base::openmode mode)
|
||||
{
|
||||
close();
|
||||
mode |= std::ios_base::out;
|
||||
m_file = fsbridge::fopen(p, openmodeToStr(mode).c_str());
|
||||
if (m_file == nullptr) {
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user