Skip to content

Commit

Permalink
Zip: use non-deprecated methods (#360)
Browse files Browse the repository at this point in the history
Fixes compiler warnings on macOS.

Signed-off-by: Steve Peters <[email protected]>
  • Loading branch information
scpeters authored Jul 17, 2023
1 parent fb27cac commit ed4cea1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Zip.cc
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ bool CompressFile(zip *_archive, const std::string &_file,
{
if (common::isDirectory(_file))
{
if (zip_add_dir(_archive, _entry.c_str()) < 0)
if (zip_dir_add(_archive, _entry.c_str(), 0) < 0)
{
ignerr << "Error adding directory to zip: " << _file << std::endl;
return false;
Expand Down Expand Up @@ -69,7 +69,7 @@ bool CompressFile(zip *_archive, const std::string &_file,
return false;
}

if (zip_add(_archive, _entry.c_str(), source)
if (zip_file_add(_archive, _entry.c_str(), source, 0)
< 0)
{
ignerr << "Error adding file to zip: " << _file << std::endl;
Expand Down

0 comments on commit ed4cea1

Please sign in to comment.