diff options
| author | Carl Hetherington <cth@carlh.net> | 2023-05-20 22:51:49 +0200 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2024-05-06 20:42:50 +0200 |
| commit | a3fcbb3a76e079a5485a0552ea5d35b8d6739116 (patch) | |
| tree | 58f6476b7197c0e32b5aa3d52d0859a9b04db268 /src/lib/unzipper.cc | |
| parent | a4105c6e8dc83407abc9b12e80c958673c942888 (diff) | |
Use sqlite for cinema and DKDM recipient lists.
Diffstat (limited to 'src/lib/unzipper.cc')
| -rw-r--r-- | src/lib/unzipper.cc | 14 |
1 files changed, 13 insertions, 1 deletions
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) { |
