File tree Expand file tree Collapse file tree 2 files changed +3
-1
lines changed Expand file tree Collapse file tree 2 files changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -160,6 +160,7 @@ static std::string openmodeToStr(std::ios_base::openmode mode)
160
160
void ifstream::open (const fs::path& p, std::ios_base::openmode mode)
161
161
{
162
162
close ();
163
+ mode |= std::ios_base::in;
163
164
m_file = fsbridge::fopen (p, openmodeToStr (mode).c_str ());
164
165
if (m_file == nullptr ) {
165
166
return ;
@@ -183,6 +184,7 @@ void ifstream::close()
183
184
void ofstream::open (const fs::path& p, std::ios_base::openmode mode)
184
185
{
185
186
close ();
187
+ mode |= std::ios_base::out;
186
188
m_file = fsbridge::fopen (p, openmodeToStr (mode).c_str ());
187
189
if (m_file == nullptr ) {
188
190
return ;
Original file line number Diff line number Diff line change @@ -35,7 +35,7 @@ static bool IsBerkeleyBtree(const fs::path& path)
35
35
boost::system::error_code ec;
36
36
if (fs::file_size (path, ec) < 4096 ) return false ;
37
37
38
- fs ::ifstream file (path. string () , std::ios::binary);
38
+ fsbridge ::ifstream file (path, std::ios::binary);
39
39
if (!file.is_open ()) return false ;
40
40
41
41
file.seekg (12 , std::ios::beg); // Magic bytes start at offset 12
You can’t perform that action at this time.
0 commit comments