This repository was 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
  Add this suggestion to a batch that can be applied as a single commit.
  This suggestion is invalid because no changes were made to the code.
  Suggestions cannot be applied while the pull request is closed.
  Suggestions cannot be applied while viewing a subset of changes.
  Only one suggestion per line can be applied in a batch.
  Add this suggestion to a batch that can be applied as a single commit.
  Applying suggestions on deleted lines is not supported.
  You must change the existing code in this line in order to create a valid suggestion.
  Outdated suggestions cannot be applied.
  This suggestion has been applied or marked resolved.
  Suggestions cannot be applied from pending reviews.
  Suggestions cannot be applied on multi-line comments.
  Suggestions cannot be applied while the pull request is queued to merge.
  Suggestion cannot be applied right now. Please check back later.
  
    
  
    
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_pathmethod resolved this path incorrectly to/nix/store/hm_image.png.On my system, I put the image in
/home/usersname/Pictures/image.pngwhich is a symlink pointing to the original file in the nix store.So when I call
neofetch --kitty /home/usersname/Pictures/image.pngit 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