Fix preview of symbolic links (#739)

This commit is contained in:
Miguel Madrid Mencía
2019-02-21 02:42:10 +01:00
committed by Junegunn Choi
parent 7bf940d261
commit 9b50e2fd5f
2 changed files with 2 additions and 2 deletions

View File

@@ -33,7 +33,7 @@ unless File.readable? path
exit 1
end
if `file --mime "#{file}"` =~ /binary/
if `file --dereference --mime "#{file}"` =~ /binary/
puts "#{file} is a binary file"
exit 0
end

View File

@@ -22,7 +22,7 @@ if [ ! -r "$FILE" ]; then
exit 1
fi
if [[ "$(file --mime "$FILE")" =~ binary ]]; then
if [[ "$(file --dereference --mime "$FILE")" =~ binary ]]; then
echo "$1 is a binary file"
exit 0
fi