Merge *base_prefix config keys into base_prefix (fixes #996)

This commit is contained in:
Guillaume Ayoub
2013-04-30 14:02:17 +02:00
parent eaa969a05c
commit bf8e874e4d
6 changed files with 39 additions and 40 deletions

View File

@ -203,6 +203,10 @@ class Collection(object):
The ``path`` is relative.
"""
# path == None means wrong URL
if path is None:
return []
# First do normpath and then strip, to prevent access to FOLDER/../
sane_path = posixpath.normpath(path.replace(os.sep, "/")).strip("/")
attributes = sane_path.split("/")
@ -490,7 +494,7 @@ class Collection(object):
@property
def url(self):
"""Get the standard collection URL."""
return "/%s/" % self.path
return "%s/" % self.path
@property
def version(self):