X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Fzipper.cc;h=625f3049a52a76df41c13d5bd94a49cfa6f6f3af;hb=027a6534067edc6fe9390d9ecc750e9982d5437c;hp=e37c8aa123779f2a8da4fb0c9e5311886c00f836;hpb=96f50dd5e600925488fdd9db1580aa01b026269b;p=dcpomatic.git diff --git a/src/lib/zipper.cc b/src/lib/zipper.cc index e37c8aa12..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))); } }