Skip to content

Commit 4ad86c8

Browse files
authored
Merge pull request #23805 from collares/sphinxext-permissions
sphinxext: Do not copy plot_directive.css's metadata
2 parents 25b39d4 + 6ffc7f3 commit 4ad86c8

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/matplotlib/sphinxext/plot_directive.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,8 @@ def _copy_css_file(app, exc):
264264
src = cbook._get_data_path('plot_directive/plot_directive.css')
265265
dst = app.outdir / Path('_static')
266266
dst.mkdir(exist_ok=True)
267-
shutil.copy(src, dst)
267+
# Use copyfile because we do not want to copy src's permissions.
268+
shutil.copyfile(src, dst / Path('plot_directive.css'))
268269

269270

270271
def setup(app):

0 commit comments

Comments
 (0)