mbrubeck / tree_magic

Determines the MIME type of a file by traversing a filetype tree.
MIT License
34 stars 9 forks source link

XDG_DATA_HOME search path doesn't work as intended #11

Closed hgmich closed 7 months ago

hgmich commented 2 years ago

The search path entry is listed here with a $HOME env var: https://github.com/mbrubeck/tree_magic/blob/adc1b4024cf0a44fdf9692ee721d36e5e8a03665/src/fdo_magic/builtin/runtime.rs#L22 but this path is then passed directly to std::fs::File::open, which does not do any expansion on this path, so it would simply be looking in the $HOME subdirectory of the application's working directory.