Skip to content

Commit 3041d0a

Browse files
committed
MNT: don't try to copy file if already in static
1 parent eff4dcd commit 3041d0a

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/pydata_sphinx_theme/__init__.py

+3
Original file line numberDiff line numberDiff line change
@@ -1166,6 +1166,9 @@ 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
1171+
continue
11691172
if not (Path(app.srcdir) / path_image).exists():
11701173
logger.warning(f"Path to {kind} image logo does not exist: {path_image}")
11711174
# Ensure templates cannot be passed for logo path to avoid security vulnerability

0 commit comments

Comments
 (0)