Skip to content

Commit

Permalink
Merge pull request AUTOMATIC1111#7535 from mcmonkey4eva/fix-symlink-e…
Browse files Browse the repository at this point in the history
…xtra-network

fix symlinks in extra networks ui
  • Loading branch information
AUTOMATIC1111 authored Feb 5, 2023
2 parents 27a50d4 + 88a46e8 commit 3993aa4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules/ui_extra_networks.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def add_pages_to_demo(app):
def fetch_file(filename: str = ""):
from starlette.responses import FileResponse

if not any([Path(x).resolve() in Path(filename).resolve().parents for x in allowed_dirs]):
if not any([Path(x).absolute() in Path(filename).absolute().parents for x in allowed_dirs]):
raise ValueError(f"File cannot be fetched: {filename}. Must be in one of directories registered by extra pages.")

ext = os.path.splitext(filename)[1].lower()
Expand Down

0 comments on commit 3993aa4

Please sign in to comment.