From: Ben Darnell Date: Sat, 25 May 2013 22:31:20 +0000 (-0400) Subject: Re-add a missing abspath call. X-Git-Tag: v3.1.0~41 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=60952528834f15c07dc9325c600650fb9af4a248;p=thirdparty%2Ftornado.git Re-add a missing abspath call. This is needed when __file__ is not absolute. --- diff --git a/tornado/web.py b/tornado/web.py index b8b22dd6c..4940244e2 100644 --- a/tornado/web.py +++ b/tornado/web.py @@ -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):