diff --git a/src/conf.py b/src/conf.py index 186419931..7e0fc35ab 100644 --- a/src/conf.py +++ b/src/conf.py @@ -941,7 +941,7 @@ class Directory(registry.String): if os.path.isabs(filename): filename = os.path.abspath(filename) selfAbs = os.path.abspath(myself) - commonPrefix = os.path.commonprefix([selfAbs, filename]) + commonPrefix = os.path.commonpath([selfAbs, filename]) filename = filename[len(commonPrefix):] elif not os.path.isabs(myself): if filename.startswith(myself): diff --git a/src/httpserver.py b/src/httpserver.py index 3b150fc11..6f81953fb 100644 --- a/src/httpserver.py +++ b/src/httpserver.py @@ -337,7 +337,7 @@ class Static(SupyHTTPServerCallback): super(Static, self).__init__() self._mimetype = mimetype def doGetOrHead(self, handler, path, write_content): - response = get_template(path) + response = get_template(path[1:]) # strip leading / if minisix.PY3: response = response.encode() handler.send_response(200)