dylanaraps / neofetch

🖼️ A command-line system information tool written in bash 3.2+
MIT License
21.56k stars 1.74k forks source link

Fix get_full_path for paths with complex filenames (e.g. files in the nix store) #2425

Open peterpf opened 6 months ago

peterpf commented 6 months ago

Description

I encountered a problem with neofetch on my NixOS system: Images located in the nix store have the following path format: /nix/store/1ayxpfhvvhq1c454acsgf4vb84m5mnr4-hm_image.png. The current implementation of the get_full_path method resolved this path incorrectly to /nix/store/hm_image.png. On my system, I put the image in /home/usersname/Pictures/image.png which is a symlink pointing to the original file in the nix store. So when I call neofetch --kitty /home/usersname/Pictures/image.png it would fall back to the default ASCII art (because it can't locate the non-existing path). This PR fixes the incorrect path resolution -- tested on my system. I assume this issue might also occur on other systems with complex filenames.

Features

Issues

TODO