srzip: Avoid recent-ish zip_file_add()

This commit is contained in:
Daniel Elstner 2015-10-16 20:35:32 +02:00
parent ef2bcf114f
commit eaa6a7a3e8
1 changed files with 2 additions and 2 deletions

View File

@ -82,7 +82,7 @@ static int zip_create(const struct sr_output *o)
/* "version" */ /* "version" */
versrc = zip_source_buffer(zipfile, "2", 1, FALSE); versrc = zip_source_buffer(zipfile, "2", 1, FALSE);
if (zip_file_add(zipfile, "version", versrc, 0) < 0) { if (zip_add(zipfile, "version", versrc) < 0) {
sr_err("Error saving version into zipfile: %s", sr_err("Error saving version into zipfile: %s",
zip_strerror(zipfile)); zip_strerror(zipfile));
zip_source_free(versrc); zip_source_free(versrc);
@ -118,7 +118,7 @@ static int zip_create(const struct sr_output *o)
g_key_file_free(meta); g_key_file_free(meta);
metasrc = zip_source_buffer(zipfile, metabuf, metalen, FALSE); metasrc = zip_source_buffer(zipfile, metabuf, metalen, FALSE);
if (zip_file_add(zipfile, "metadata", metasrc, 0) < 0) { if (zip_add(zipfile, "metadata", metasrc) < 0) {
sr_err("Error saving metadata into zipfile: %s", sr_err("Error saving metadata into zipfile: %s",
zip_strerror(zipfile)); zip_strerror(zipfile));
zip_source_free(metasrc); zip_source_free(metasrc);