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):
parts = path.split(os.sep)
try:
i = len(parts) - parts[::-1].index(os.pardir)
parts[:i] = os.path.realpath(parts[:i].join(os.sep)),
path = parts.join(os.sep)
parts[:i] = os.path.realpath(os.sep.join(parts[:i])),
path = os.sep.join(parts)
except ValueError:
pass
# 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