Skip to content

Commit

Permalink
MNT: don't try to copy file if already in static
Browse files Browse the repository at this point in the history
  • Loading branch information
jklymak committed Mar 1, 2023
1 parent eff4dcd commit 5d8e580
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/pydata_sphinx_theme/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -1166,6 +1166,9 @@ def copy_logo_images(app: Sphinx, exception=None) -> None:
path_image = logo.get(f"image_{kind}")
if not path_image or isurl(path_image):
continue
if os.path.isfile(staticdir / Path(path_image).name):
# file already exists in static dir
continue
if not (Path(app.srcdir) / path_image).exists():
logger.warning(f"Path to {kind} image logo does not exist: {path_image}")
# Ensure templates cannot be passed for logo path to avoid security vulnerability
Expand Down

0 comments on commit 5d8e580

Please sign in to comment.