fox-it / dissect.target

The Dissect module tying all other Dissect modules together. It provides a programming API and command line tools which allow easy access to various data sources inside disk images or file collections (a.k.a. targets).
GNU Affero General Public License v3.0
43 stars 44 forks source link

Config parser does not work with TargetPath instances #719

Closed JSCU-CNI closed 2 months ago

JSCU-CNI commented 3 months ago

If we understand correctly the following invocation of the config parser helper utility should work:

from dissect.target.helpers import configutil
some_path = target.fs.path("/path/to/file")
configutil.parse(some_path)

However, we are greeted with the following exception, since a TargetPath does not have a follow_symlinks argument (but a FilesystemEntry does):

dissect/target/helpers/configutil.py:751, in parse(path, hint, \*args, \*\*kwargs)
TypeError: TargetPath.is_file() got an unexpected keyword argument 'follow_symlinks'
cecinestpasunepipe commented 3 months ago

Thanks for bringing this up, we're looking into it.

JSCU-CNI commented 2 months ago

Thanks for the fix!