Closed damselem closed 5 years ago
Thanks for the report. Is there any chance you could prepare a pull request?
Unfortunately I don't have any experience with Rust. However, I just looked at the API for std::fs::metadata
and it explicitly mentions the fact that it follows symlinks... I will debug it further tomorrow and I'll report back.
I wrote a unit test that suggests that symlinks are already correctly handled. Please let me know if the unit test is insufficient -- I intended for it to match this setup / use-case..
Today I encountered this issue when trying to use alacritty. It seems it relies on this crate in order to check whether a certain configuration file (
alacritty.yml
) exists (link). I do have that file in one of the valid locations, but it's symlinked from a parent directory. Removing the symlink and replacing it with a regular file seems to fix the problem.$XDG_CONFIG_HOME/alacritty -> /Users/damselem/.dotfiles/config/alacritty
However, I'd expect the
path_exists
method to follow symlinks.