Canonicalise missing elements in readlink

Fixes #81.
This commit is contained in:
Chris Down 2018-05-09 13:02:54 +01:00
parent 83289bb94d
commit 44545be18e

View file

@ -27,7 +27,7 @@ for file in /proc/self/fd/2 /dev/stderr; do
[[ -f "$file" ]] || continue [[ -f "$file" ]] || continue
# In Linux, it's not possible to write to a socket represented by a file # In Linux, it's not possible to write to a socket represented by a file
# (for example, /dev/stderr or /proc/self/fd/2). See issue #54. # (for example, /dev/stderr or /proc/self/fd/2). See issue #54.
[[ -f "$(readlink "$file")" ]] || continue [[ -f "$(readlink -m "$file")" ]] || continue
xsel_log="$file" xsel_log="$file"
break break
done done