You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@buildstream.apache.org by gi...@apache.org on 2020/12/29 13:13:52 UTC
[buildstream] 31/43: Rearrange comment
This is an automated email from the ASF dual-hosted git repository.
github-bot pushed a commit to branch jmac/cas_to_cas_oct_v2
in repository https://gitbox.apache.org/repos/asf/buildstream.git
commit e5e5be9dccb1c0ed2f6ef919a2fe2218edadf8ff
Author: Jim MacArthur <ji...@codethink.co.uk>
AuthorDate: Fri Oct 26 14:11:37 2018 +0100
Rearrange comment
---
buildstream/storage/_casbaseddirectory.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/buildstream/storage/_casbaseddirectory.py b/buildstream/storage/_casbaseddirectory.py
index c5768a8..a7d656d 100644
--- a/buildstream/storage/_casbaseddirectory.py
+++ b/buildstream/storage/_casbaseddirectory.py
@@ -400,11 +400,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)