summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJürg Billeter <j@bitron.ch>2019-02-01 11:28:31 +0000
committerJürg Billeter <j@bitron.ch>2019-02-01 11:42:41 +0000
commitf3095332da75302f5e2826cb5b66931deede4318 (patch)
tree5e10f4ae9e0228b87b2d78e93bb4fd4f1db41c4e
parent0449c118c5eb80c13e7f0aedbfc7434c5166bb60 (diff)
downloadbuildstream-juerg/list-relative-paths.tar.gz
_casbaseddirectory.py: Return all directories in list_relative_paths()juerg/list-relative-paths
This matches the change in utils.list_relative_paths().
-rw-r--r--buildstream/storage/_casbaseddirectory.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/buildstream/storage/_casbaseddirectory.py b/buildstream/storage/_casbaseddirectory.py
index 09c8c9875..b6a39b83d 100644
--- a/buildstream/storage/_casbaseddirectory.py
+++ b/buildstream/storage/_casbaseddirectory.py
@@ -800,11 +800,11 @@ class CasBasedDirectory(Directory):
directory_list = filter(lambda i: isinstance(i[1].buildstream_object, CasBasedDirectory),
self.index.items())
- if file_list == [] and relpath != "":
+ if relpath != "":
yield relpath
- else:
- for (k, v) in sorted(file_list):
- yield os.path.join(relpath, k)
+
+ for (k, v) in sorted(file_list):
+ yield os.path.join(relpath, k)
for (k, v) in sorted(directory_list):
yield from v.buildstream_object.list_relative_paths(relpath=os.path.join(relpath, k))