Commit 19d82970 authored by Dylan Araps's avatar Dylan Araps

Args: Fix issues with symlinks

parent bfec8bad
...@@ -3255,7 +3255,7 @@ get_full_path() { ...@@ -3255,7 +3255,7 @@ get_full_path() {
# For example "Pictures/Wallpapers" --> "/home/dylan/Pictures/Wallpapers" # For example "Pictures/Wallpapers" --> "/home/dylan/Pictures/Wallpapers"
# If the file exists in the current directory, stop here. # 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 if ! cd "${1%/*}"; then
err "Error: Directory '${1%/*}' doesn't exist or is inaccessible" err "Error: Directory '${1%/*}' doesn't exist or is inaccessible"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment