Skip to content

Commit

Permalink
zip: Properly report error on zip_close (#33)
Browse files Browse the repository at this point in the history
  • Loading branch information
SoSeDiK authored Apr 12, 2024
1 parent 1787177 commit d41e8ac
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions hyprcursor-util/src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -203,9 +203,8 @@ static std::optional<std::string> createCursorThemeFromPath(const std::string& p

// close zip and write
if (zip_close(zip) < 0) {
zip_error_t ziperror;
zip_error_init_with_code(&ziperror, errp);
return "Failed to write " + OUTPUTFILE + ": " + zip_error_strerror(&ziperror);
zip_error_t* ziperror = zip_get_error(zip);
return "Failed to write " + OUTPUTFILE + ": " + zip_error_strerror(ziperror);
}

std::cout << "Written " << OUTPUTFILE << "\n";
Expand Down

0 comments on commit d41e8ac

Please sign in to comment.