Merge pull request #403 from Unrud/patch-9
Don't sanitize local paths using posixpath
This commit is contained in:
commit
f8c8bd9d9b
@ -97,7 +97,6 @@ def path_to_filesystem(root, *paths):
|
|||||||
Conversion is done in a secure manner, or raises ``ValueError``.
|
Conversion is done in a secure manner, or raises ``ValueError``.
|
||||||
|
|
||||||
"""
|
"""
|
||||||
root = sanitize_path(root)
|
|
||||||
paths = [sanitize_path(path).strip("/") for path in paths]
|
paths = [sanitize_path(path).strip("/") for path in paths]
|
||||||
safe_path = root
|
safe_path = root
|
||||||
for path in paths:
|
for path in paths:
|
||||||
@ -303,7 +302,7 @@ class Collection(BaseCollection):
|
|||||||
_, directories, _ = next(os.walk(collection._filesystem_path))
|
_, directories, _ = next(os.walk(collection._filesystem_path))
|
||||||
for sub_path in directories:
|
for sub_path in directories:
|
||||||
full_path = os.path.join(collection._filesystem_path, sub_path)
|
full_path = os.path.join(collection._filesystem_path, sub_path)
|
||||||
if os.path.exists(path_to_filesystem(full_path)):
|
if os.path.exists(full_path):
|
||||||
yield cls(posixpath.join(path, sub_path))
|
yield cls(posixpath.join(path, sub_path))
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
|
Loading…
Reference in New Issue
Block a user