X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Fzipper.cc;h=625f3049a52a76df41c13d5bd94a49cfa6f6f3af;hb=38643ec631074ae628a4c414a1e7a3462aba19ed;hp=db84cdf71db596062a68b6ad5a8ec06382fd337c;hpb=b1eda03eac8661d8b3b1e8db7a0cf7c793e8f46c;p=dcpomatic.git 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))); } }