From 60952528834f15c07dc9325c600650fb9af4a248 Mon Sep 17 00:00:00 2001 From: Ben Darnell Date: Sat, 25 May 2013 18:31:20 -0400 Subject: [PATCH] Re-add a missing abspath call. This is needed when __file__ is not absolute. --- tornado/web.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tornado/web.py b/tornado/web.py index b8b22dd6..4940244e 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):