Re-add a missing abspath call.

This is needed when __file__ is not absolute.
This commit is contained in:
Ben Darnell 2013-05-25 18:31:20 -04:00
parent 7b03cd62fb
commit 6095252883
1 changed files with 1 additions and 0 deletions

View File

@ -1916,6 +1916,7 @@ class StaticFileHandler(RequestHandler):
In instance methods, this method's result is available as
``self.absolute_path``.
"""
root = os.path.abspath(root)
# os.path.abspath strips a trailing /
# it needs to be temporarily added back for requests to root/
if not (absolute_path + os.path.sep).startswith(root):