fnp
/
wolnelektury.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'search' of git+ssh://stigma.fnp/home/mkoziej/wl into search
[wolnelektury.git]
/
apps
/
catalogue
/
utils.py
diff --git
a/apps/catalogue/utils.py
b/apps/catalogue/utils.py
index
29a1857
..
0134701
100644
(file)
--- 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:
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()
finally:
zipf.close()