Replace deprecated zip_add() with zip_file_add().
authorCarl Hetherington <cth@carlh.net>
Sat, 11 Nov 2023 00:59:22 +0000 (01:59 +0100)
committerCarl Hetherington <cth@carlh.net>
Sun, 12 Nov 2023 21:11:27 +0000 (22:11 +0100)
src/lib/zipper.cc

index e37c8aa123779f2a8da4fb0c9e5311886c00f836..db84cdf71db596062a68b6ad5a8ec06382fd337c 100644 (file)
@@ -57,7 +57,7 @@ Zipper::add (string name, string content)
                throw runtime_error ("could not create ZIP source");
        }
 
-       if (zip_add(_zip, name.c_str(), source) == -1) {
+       if (zip_file_add(_zip, name.c_str(), source, ZIP_FL_ENC_GUESS) == -1) {
                throw runtime_error(String::compose("failed to add data to ZIP archive (%1)", zip_strerror(_zip)));
        }
 }