Skip to content

Commit

Permalink
Replace Path.absolute with os.path.abspath (#72)
Browse files Browse the repository at this point in the history
  • Loading branch information
Archmonger authored Apr 6, 2022
1 parent 92c0e42 commit 83fcb8d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/django_idom/http/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ async def web_modules_file(request: HttpRequest, file: str) -> HttpResponse:
"""Gets JavaScript required for IDOM modules at runtime. These modules are
returned from cache if available."""
web_modules_dir = IDOM_WED_MODULES_DIR.current
path = web_modules_dir.joinpath(*file.split("/")).absolute()
path = os.path.abspath(web_modules_dir.joinpath(*file.split("/")))

# Prevent attempts to walk outside of the web modules dir
if str(web_modules_dir) != os.path.commonpath((path, web_modules_dir)):
Expand Down

0 comments on commit 83fcb8d

Please sign in to comment.