Skip to content

Commit 6329633

Browse files
piscisaureusry
authored andcommitted
Windows: open files in binary mode
1 parent aa95e57 commit 6329633

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/node_file.cc

+5
Original file line numberDiff line numberDiff line change
@@ -870,6 +870,11 @@ void InitFs(Handle<Object> target) {
870870
stats_constructor_template->GetFunction());
871871
StatWatcher::Initialize(target);
872872
File::Initialize(target);
873+
874+
#ifdef __MINGW32__
875+
// Open files in binary mode by default
876+
_fmode = _O_BINARY;
877+
#endif
873878
}
874879

875880
} // end namespace node

0 commit comments

Comments
 (0)