Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

peterpf
Copy link

@peterpf peterpf commented Dec 23, 2023

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

…ayxpfhvvhq1c454acsgf4vb84m5mnr4-hm_image.png; it would wrongfully return the full_dir as /nix/store/hm_image.png
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant