From a3fcbb3a76e079a5485a0552ea5d35b8d6739116 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Sat, 20 May 2023 22:51:49 +0200 Subject: Use sqlite for cinema and DKDM recipient lists. --- src/lib/unzipper.cc | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'src/lib/unzipper.cc') diff --git a/src/lib/unzipper.cc b/src/lib/unzipper.cc index f0170e7e0..8d468f24f 100644 --- a/src/lib/unzipper.cc +++ b/src/lib/unzipper.cc @@ -56,8 +56,20 @@ Unzipper::~Unzipper() } +bool +Unzipper::contains(string const& filename) const +{ + auto file = zip_fopen(_zip, filename.c_str(), 0); + bool exists = file != nullptr; + if (file) { + zip_fclose(file); + } + return exists; +} + + string -Unzipper::get(string const& filename) +Unzipper::get(string const& filename) const { auto file = zip_fopen(_zip, filename.c_str(), 0); if (!file) { -- cgit v1.2.3