diff options
author | Chun Kuan Lee <ken2812221@gmail.com> | 2019-02-23 22:25:24 +0800 |
---|---|---|
committer | Chun Kuan Lee <ken2812221@gmail.com> | 2019-02-23 23:44:28 +0800 |
commit | 6ad79cbd562d04ebbcb61c774fb3389e70fedb7c (patch) | |
tree | df3e967adbacd7105162fea735164fc99ee50342 /src/fs.cpp | |
parent | f3f9c1de19e6d254e0c3a26ce7a3d8cd57fb7641 (diff) |
wallet: Use fsbridge::ifstream to fix Windows path issue
Diffstat (limited to 'src/fs.cpp')
-rw-r--r-- | src/fs.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/fs.cpp b/src/fs.cpp index 3c8f4c0247..f937f64e04 100644 --- a/src/fs.cpp +++ b/src/fs.cpp @@ -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; |