From 19d829706c79227116c4686bf069891123968140 Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Thu, 19 Jan 2017 23:35:25 +1100 Subject: [PATCH] Args: Fix issues with symlinks --- neofetch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/neofetch b/neofetch index 7761f0df..13482ca5 100755 --- a/neofetch +++ b/neofetch @@ -3255,7 +3255,7 @@ get_full_path() { # For example "Pictures/Wallpapers" --> "/home/dylan/Pictures/Wallpapers" # If the file exists in the current directory, stop here. - [[ -f "${PWD}/${1%/*}" ]] && { printf "%s\n" "${PWD}/${1%/*}"; return; } + [[ -f "${PWD}/${1/*\/}" ]] && { printf "%s\n" "${PWD}/${1/*\/}"; return; } if ! cd "${1%/*}"; then err "Error: Directory '${1%/*}' doesn't exist or is inaccessible"