From 73ef0d0378ba1c987f99522ba904cba9fd4b0ad4 Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Sat, 5 Jan 2013 11:40:42 +0200 Subject: [PATCH] Pass mode to ZlibCompressed This makes creating compressed packs work. The temporary file is opened with M_RDWR because we want to read the data back from the same handle, so ZlibCompressed can't autodetect the mode. --- source/input.cpp | 2 +- source/output.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/source/input.cpp b/source/input.cpp index a1d462a..4a44dea 100644 --- a/source/input.cpp +++ b/source/input.cpp @@ -18,7 +18,7 @@ Input::~Input() void Input::set_decompress() { - compressed = new IO::ZlibCompressed(*in); + compressed = new IO::ZlibCompressed(*in, IO::M_READ); in = compressed; } diff --git a/source/output.cpp b/source/output.cpp index f2e9064..2d33810 100644 --- a/source/output.cpp +++ b/source/output.cpp @@ -18,7 +18,7 @@ Output::~Output() void Output::set_compressed() { - compressed = new IO::ZlibCompressed(*out); + compressed = new IO::ZlibCompressed(*out, IO::M_WRITE); out = compressed; } -- 2.45.2