summaryrefslogtreecommitdiff
path: root/src/io/ozlibstream.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/io/ozlibstream.cpp')
-rw-r--r--src/io/ozlibstream.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/io/ozlibstream.cpp b/src/io/ozlibstream.cpp
index 605d1397d0..36c6b42d61 100644
--- a/src/io/ozlibstream.cpp
+++ b/src/io/ozlibstream.cpp
@@ -92,4 +92,18 @@ int deflate_streambuf::sync()
return 0;
}
+void ozlibstream::close()
+{
+ try
+ {
+ buf.close();
+ }
+ catch(...)
+ {
+ setstate(badbit); //FIXME: This will throw the wrong type of exception
+ //but there's no good way of setting the badbit
+ //without causing an exception when exceptions is set
+ }
+}
+
}