More detailed errors from zip_close.
authorCarl Hetherington <cth@carlh.net>
Sun, 1 Dec 2019 23:04:30 +0000 (23:04 +0000)
committerCarl Hetherington <cth@carlh.net>
Sun, 1 Dec 2019 23:04:30 +0000 (23:04 +0000)
src/lib/cinema_kdms.cc

index 7952b7a..158ce81 100644 (file)
@@ -74,7 +74,8 @@ CinemaKDMs::make_zip_file (boost::filesystem::path zip_file, dcp::NameFormat nam
        }
 
        if (zip_close (zip) == -1) {
-               throw runtime_error ("failed to close ZIP archive");
+               zip_error_t* e = zip_get_error (zip);
+               throw runtime_error (String::compose("failed to close ZIP archive (%1, %2)", zip_error_code_zip(e), zip_error_code_system(e)));
        }
 }