summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcel Hellkamp <marc@gsites.de>2019-12-19 17:07:15 +0100
committerMarcel Hellkamp <marc@gsites.de>2019-12-20 16:16:53 +0100
commit8561ffbc2ed2b16b4f7f90520d148e37e251d107 (patch)
treee56f84b2d436fd8ab6f472cf4d33790efb36c2bf
parent48e9dfef69d94d1acabb46cd6976acfcc214377b (diff)
downloadbottle-8561ffbc2ed2b16b4f7f90520d148e37e251d107.tar.gz
Revert "fix #1186: Bottle fails to find templates on windows"
This reverts commit 085f18615fe8ab63588eebfd25bb90337aac2ba0.
-rwxr-xr-xbottle.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/bottle.py b/bottle.py
index 18aa69f..c52c20d 100755
--- a/bottle.py
+++ b/bottle.py
@@ -2691,7 +2691,8 @@ class ResourceManager(object):
res.add_path('./resources/', __file__)
"""
base = os.path.abspath(os.path.dirname(base or self.base))
- path = os.path.abspath(os.path.join(base, os.path.dirname(path))) + "/"
+ path = os.path.abspath(os.path.join(base, os.path.dirname(path)))
+ path += os.sep
if path in self.path:
self.path.remove(path)
if create and not os.path.isdir(path):
@@ -3840,7 +3841,7 @@ class BaseTemplate(object):
"Refer to templates with names or paths relative to the lookup path.")
for spath in lookup:
- spath = os.path.abspath(spath) + "/"
+ spath = os.path.abspath(spath) + os.sep
fname = os.path.abspath(os.path.join(spath, name))
if not fname.startswith(spath): continue
if os.path.isfile(fname): return fname