Skip to content

Commit cfbcfc0

Browse files
authored
Fix writing files for windows (#13)
1 parent 4b945eb commit cfbcfc0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Encoder.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,8 +108,8 @@ namespace nbs {
108108

109109
auto path = info[0].As<Napi::String>().Utf8Value();
110110

111-
outputFile = std::make_unique<std::ofstream>(path);
112-
indexFile = std::make_unique<zstr::ofstream>(path + ".idx");
111+
outputFile = std::make_unique<std::ofstream>(path, std::ios_base::binary);
112+
indexFile = std::make_unique<zstr::ofstream>(path + ".idx", std::ios_base::binary);
113113
}
114114

115115
Napi::Value Encoder::Write(const Napi::CallbackInfo& info) {

0 commit comments

Comments
 (0)