changeset 913:e053a27e5aae

server: Fix crash when serving temp files like CSS maps.
author Ludovic Chabant <ludovic@chabant.com>
date Thu, 11 May 2017 13:21:18 -0700
parents cd236a6af9f6
children d91e013b586a
files piecrust/serving/server.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/piecrust/serving/server.py	Fri Apr 28 10:05:14 2017 -0700
+++ b/piecrust/serving/server.py	Thu May 11 13:21:18 2017 -0700
@@ -147,7 +147,7 @@
         if request.path.startswith('/_cache/'):
             # Some stuff needs to be served directly from the cache directory,
             # like LESS CSS map files.
-            full_path = os.path.join(self.root_dir, rel_req_path)
+            full_path = os.path.join(self.appfactory.root_dir, rel_req_path)
         else:
             full_path = os.path.join(self._out_dir, rel_req_path)