Commit 8af897b6 authored by Arnaud Fontaine's avatar Arnaud Fontaine

ERP5VCS: Fix WorkingCopy with path containing '..'.

parent 20483699
...@@ -118,8 +118,8 @@ class WorkingCopy(Implicit): ...@@ -118,8 +118,8 @@ class WorkingCopy(Implicit):
parts = path.split(os.sep) parts = path.split(os.sep)
try: try:
i = len(parts) - parts[::-1].index(os.pardir) i = len(parts) - parts[::-1].index(os.pardir)
parts[:i] = os.path.realpath(parts[:i].join(os.sep)), parts[:i] = os.path.realpath(os.sep.join(parts[:i])),
path = parts.join(os.sep) path = os.sep.join(parts)
except ValueError: except ValueError:
pass pass
# Allow symlinks inside instance home. # Allow symlinks inside instance home.
......
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