neofetch
neofetch copied to clipboard
Fix get_full_path for paths with complex filenames (e.g. files in the nix store)
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.