[Tagpreview] Handle absolute file paths correctly (#1229)

Fix #1228
This commit is contained in:
Ingo Meyer authored and GitHub committed 2021-01-20 20:34:56 +09:00
1 parent 1fcdee55cc
commit 36de5db9f0
1 file changed
+4 -1
+4 -1
View File
@@ -10,7 +10,10 @@ fi
IFS=':' read -r FILE TAGFILE EXCMD <<< "$*"
FILE="$(dirname "${TAGFILE}")/${FILE}"
# Complete file paths which are relative to the given tag file
if [ "${FILE:0:1}" != "/" ]; then
FILE="$(dirname "${TAGFILE}")/${FILE}"
fi
if [ ! -r "$FILE" ]; then
echo "File not found ${FILE}"