You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@buildstream.apache.org by GitBox <gi...@apache.org> on 2022/02/20 02:38:43 UTC
[GitHub] [buildstream] gtristan commented on issue #661: descend in _filebaseddirectory.py fails if "." etc is in the "subdirectory_spec" argument
gtristan commented on issue #661:
URL: https://github.com/apache/buildstream/issues/661#issuecomment-1046147085
This is quite old and looking at the code, the report no longer really tracks, the `.` cases also appear to be handled in `FileBasedDirectory.descend()` now.
The [current code](https://github.com/apache/buildstream/blob/master/src/buildstream/storage/_filebaseddirectory.py#L49) currently runs as follows:
```python
def descend(self, *paths, create=False, follow_symlinks=False):
""" See superclass Directory for arguments """
current_dir = self
for path in paths:
# Skip empty path segments
if not path:
continue
if path == ".":
continue
if path == "..":
if current_dir.parent is not None:
current_dir = current_dir.parent
# In POSIX /.. == / so just stay at the root dir
continue
...
```
I'll close this now as this doesn't match up with current state of affairs, and related issue #512 also appears to be resolved and fixed.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@buildstream.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org