Revert a strange commit (let's say I was tired)

This commit is contained in:
Guillaume Ayoub 2013-05-13 18:14:42 +02:00
parent 69e2eb0908
commit 040d3b87a8

View File

@ -210,7 +210,7 @@ class Collection(object):
# First do normpath and then strip, to prevent access to FOLDER/../
sane_path = posixpath.normpath(path.replace(os.sep, "/")).strip("/")
attributes = sane_path.split("/")
if not sane_path or not attributes:
if not attributes:
return []
if not (cls.is_leaf("/".join(attributes)) or path.endswith("/")):
attributes.pop()