Skip to content

Commit

Permalink
Use abspath for static dirs
Browse files Browse the repository at this point in the history
  • Loading branch information
tw4l committed Nov 5, 2024
1 parent fe2403f commit 839694f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pywb/apps/static_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,13 @@ def __call__(self, environ, url_str):

full_path = environ.get('pywb.static_dir')
if full_path:
static_path_to_validate = full_path
static_path_to_validate = os.path.abspath(full_path)
full_path = os.path.join(full_path, url)
if not os.path.isfile(full_path):
full_path = None

if not full_path:
static_path_to_validate = self.static_path
static_path_to_validate = os.path.abspath(self.static_path)
full_path = os.path.join(self.static_path, url)

try:
Expand Down

0 comments on commit 839694f

Please sign in to comment.