X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/f4a7254db57835252ea0cf23ab45d0baea71dc38..98a11b1afa8d82d4843705f6ffff799b1eeaed50:/apps/catalogue/utils.py?ds=sidebyside diff --git a/apps/catalogue/utils.py b/apps/catalogue/utils.py index 29a1857b0..0134701a6 100644 --- a/apps/catalogue/utils.py +++ b/apps/catalogue/utils.py @@ -111,8 +111,10 @@ def create_zip(paths, zip_slug): if not path.exists(path.join(zip_path, zip_filename)): zipf = ZipFile(path.join(zip_path, zip_filename), 'w') try: - for p in paths: - zipf.write(p, path.basename(p)) + for arcname, p in paths: + if arcname is None: + arcname = path.basename(p) + zipf.write(p, arcname) finally: zipf.close()