Fix T50007: blender offline python documentation in zipped HTML files, not shown correctly.
Stupid mistake, os.scandir is not recursive... Patch by @brecht, thanks.
This commit is contained in:
@@ -142,8 +142,11 @@ def main():
|
|||||||
zip_name = "blender_python_reference_%s" % blenver_zip # We can't use 'release' postfix here...
|
zip_name = "blender_python_reference_%s" % blenver_zip # We can't use 'release' postfix here...
|
||||||
zip_path = os.path.join(args.mirror_dir, zip_name)
|
zip_path = os.path.join(args.mirror_dir, zip_name)
|
||||||
with zipfile.ZipFile(zip_path, 'w') as zf:
|
with zipfile.ZipFile(zip_path, 'w') as zf:
|
||||||
for de in os.scandir(api_dir):
|
for dirname, _, filenames in os.walk(api_dir):
|
||||||
zf.write(de.path, arcname=os.path.join(zip_name, de.name))
|
for filename in filenames:
|
||||||
|
filepath = os.path.join(dirname, filename)
|
||||||
|
zip_filepath = os.path.join(zip_name, os.path.relpath(filepath, api_dir))
|
||||||
|
zf.write(filepath, arcname=zip_filepath)
|
||||||
os.rename(zip_path, os.path.join(api_dir, "%s.zip" % zip_name))
|
os.rename(zip_path, os.path.join(api_dir, "%s.zip" % zip_name))
|
||||||
|
|
||||||
# VII) Create symlinks and html redirects.
|
# VII) Create symlinks and html redirects.
|
||||||
|
Reference in New Issue
Block a user