From d41e8ac8d17d31fe6239aee69e6a0b28d691ad0c Mon Sep 17 00:00:00 2001 From: SoSeDiK Date: Fri, 12 Apr 2024 13:54:39 +0300 Subject: [PATCH] zip: Properly report error on zip_close (#33) --- hyprcursor-util/src/main.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/hyprcursor-util/src/main.cpp b/hyprcursor-util/src/main.cpp index 13669c9..2ce9ee7 100644 --- a/hyprcursor-util/src/main.cpp +++ b/hyprcursor-util/src/main.cpp @@ -203,9 +203,8 @@ static std::optional 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";