Commit 081ea835 by rfkelly0

WrapFS: when encoding paths, normalise out "." and ".." components

parent 5183afc6
...@@ -86,9 +86,8 @@ class WrapFS(FS): ...@@ -86,9 +86,8 @@ class WrapFS(FS):
def _encode(self, path): def _encode(self, path):
"""Encode path for the underlying FS.""" """Encode path for the underlying FS."""
names = path.split("/")
e_names = [] e_names = []
for name in names: for name in iteratepath(path):
if name == "": if name == "":
e_names.append("") e_names.append("")
else: else:
...@@ -97,9 +96,8 @@ class WrapFS(FS): ...@@ -97,9 +96,8 @@ class WrapFS(FS):
def _decode(self, path): def _decode(self, path):
"""Decode path from the underlying FS.""" """Decode path from the underlying FS."""
names = path.split("/")
d_names = [] d_names = []
for name in names: for name in iteratepath(path):
if name == "": if name == "":
d_names.append("") d_names.append("")
else: else:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment