aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bbot/utility.txx8
-rw-r--r--bbot/worker/worker.cxx2
2 files changed, 6 insertions, 4 deletions
diff --git a/bbot/utility.txx b/bbot/utility.txx
index 3199a61..e7db0ee 100644
--- a/bbot/utility.txx
+++ b/bbot/utility.txx
@@ -152,9 +152,11 @@ namespace bbot
bool d (f.extension () == "lz4");
- ifdstream ifs (f, (d
- ? ifdstream::badbit
- : ifdstream::badbit | ifdstream::failbit));
+ ifdstream ifs (f,
+ (d ? fdopen_mode::binary : fdopen_mode::none),
+ (d
+ ? ifdstream::badbit
+ : ifdstream::badbit | ifdstream::failbit));
ilz4stream izs;
if (d)
diff --git a/bbot/worker/worker.cxx b/bbot/worker/worker.cxx
index eb7f50b..c1530f8 100644
--- a/bbot/worker/worker.cxx
+++ b/bbot/worker/worker.cxx
@@ -585,7 +585,7 @@ upload_manifest (tracer& trace,
try
{
tmp = auto_rmfile (path::temp_path (what + "-manifest.lz4"));
- ofdstream ofs (tmp.path);
+ ofdstream ofs (tmp.path, fdopen_mode::binary);
olz4stream ozs (ofs, 9, 5 /* 256KB */, nullopt /* content_size */);
manifest_serializer s (ozs, tmp.path.string ());
m.serialize (s);