TargetPath.parents seems broken
Closed this issue · 2 comments
JSCU-CNI commented
TargetPath.parents
seems to be broken.
$ target-shell -p /tmp/example.vmx
In [1]: foo = t.fs.path("/sysvol/Users/Administrator")
In [2]: foo.parent
Out[2]: TargetPath('/sysvol/Users')
In [3]: foo.parents
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
Cell In[3], line 1
----> 1 foo.parents
File /tmp/dissect.target/dissect/target/helpers/fsutil.py:652, in PureDissectPath.parents(self)
650 @property
651 def parents(self):
--> 652 return _DissectPathParents(self)
File /tmp/dissect.target/dissect/target/helpers/fsutil.py:564, in _DissectPathParents.__init__(self, path)
562 super().__init__(path)
563 self._fs = path._fs
--> 564 self._flavour = path._flavour
AttributeError: '_DissectPathParents' object has no attribute '_flavour'
In [4]:
Schamper commented
I'm working on some changes that should make TargetPath easier to maintain across Python versions. It includes a fix for this (which was a small change). Expect a PR soon.