summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim MacArthur <jim.macarthur@codethink.co.uk>2018-10-26 14:11:37 +0100
committerJim MacArthur <jim.macarthur@codethink.co.uk>2018-10-26 14:11:37 +0100
commit711c98472e024028e9392a791c850fc9ee326ede (patch)
tree226d5cc59021d47970dc091725786b7903c41333
parenta82e6d9541c404366c2866c2f2ef57497a71a567 (diff)
downloadbuildstream-jmac/cas_to_cas_oct.tar.gz
Rearrange commentjmac/cas_to_cas_oct
-rw-r--r--buildstream/storage/_casbaseddirectory.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/buildstream/storage/_casbaseddirectory.py b/buildstream/storage/_casbaseddirectory.py
index a99b4868f..53fdb037f 100644
--- a/buildstream/storage/_casbaseddirectory.py
+++ b/buildstream/storage/_casbaseddirectory.py
@@ -399,11 +399,11 @@ class CasBasedDirectory(Directory):
if c == ".":
pass
elif c == "..":
+ if directory.parent is not None:
+ directory = directory.parent
# If directory.parent *is* None, this is an attempt to access
# '..' from the root, which is valid under POSIX; it just
# returns the root.
- if directory.parent is not None:
- directory = directory.parent
else:
if c in directory.index:
f = directory._resolve(c, absolute_symlinks_resolve, first_seen_object=first_seen_object)