summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/zipper.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/lib/zipper.cc b/src/lib/zipper.cc
index db84cdf71..625f3049a 100644
--- a/src/lib/zipper.cc
+++ b/src/lib/zipper.cc
@@ -57,7 +57,11 @@ Zipper::add (string name, string content)
throw runtime_error ("could not create ZIP source");
}
+#ifdef DCPOMATIC_HAVE_ZIP_FILE_ADD
if (zip_file_add(_zip, name.c_str(), source, ZIP_FL_ENC_GUESS) == -1) {
+#else
+ if (zip_add(_zip, name.c_str(), source) == -1) {
+#endif
throw runtime_error(String::compose("failed to add data to ZIP archive (%1)", zip_strerror(_zip)));
}
}