KajetanNiewczas commited on
Commit
dc89457
·
1 Parent(s): 3a8a4ba

Fix zip issues

Browse files
Files changed (1) hide show
  1. src/interface/download_files.py +3 -2
src/interface/download_files.py CHANGED
@@ -16,8 +16,9 @@ def download_files(folder_path) -> str:
16
 
17
  with zipfile.ZipFile(zip_path, 'w', zipfile.ZIP_DEFLATED) as zipf:
18
  for file in folder.rglob('*'):
19
- if file.is_file():
20
- zipf.write(file, arcname="presentation")
 
21
  LOGGER.info("📦 Created zip archive at %s", zip_path)
22
 
23
  return str(zip_path)
 
16
 
17
  with zipfile.ZipFile(zip_path, 'w', zipfile.ZIP_DEFLATED) as zipf:
18
  for file in folder.rglob('*'):
19
+ if file.is_file() and file != zip_path:
20
+ arcname = Path("presentation") / file.relative_to(folder)
21
+ zipf.write(file, arcname=arcname)
22
  LOGGER.info("📦 Created zip archive at %s", zip_path)
23
 
24
  return str(zip_path)