Skip to content

Commit 988fde0

Browse files
committed
MNT: do not copy file if already in static
1 parent eff4dcd commit 988fde0

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/pydata_sphinx_theme/__init__.py

+4
Original file line numberDiff line numberDiff line change
@@ -1166,6 +1166,10 @@ def copy_logo_images(app: Sphinx, exception=None) -> None:
11661166
path_image = logo.get(f"image_{kind}")
11671167
if not path_image or isurl(path_image):
11681168
continue
1169+
if (staticdir / Path(path_image).name).exists():
1170+
# file already exists in static dir e.g. because a theme has
1171+
# bundled the logo and installed it there
1172+
continue
11691173
if not (Path(app.srcdir) / path_image).exists():
11701174
logger.warning(f"Path to {kind} image logo does not exist: {path_image}")
11711175
# Ensure templates cannot be passed for logo path to avoid security vulnerability

0 commit comments

Comments
 (0)