mirror of
https://github.com/junegunn/fzf.vim.git
synced 2025-12-07 21:24:40 +08:00
Fix preview of symbolic links (#739)
This commit is contained in:
committed by
Junegunn Choi
parent
7bf940d261
commit
9b50e2fd5f
@@ -33,7 +33,7 @@ unless File.readable? path
|
|||||||
exit 1
|
exit 1
|
||||||
end
|
end
|
||||||
|
|
||||||
if `file --mime "#{file}"` =~ /binary/
|
if `file --dereference --mime "#{file}"` =~ /binary/
|
||||||
puts "#{file} is a binary file"
|
puts "#{file} is a binary file"
|
||||||
exit 0
|
exit 0
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ if [ ! -r "$FILE" ]; then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ "$(file --mime "$FILE")" =~ binary ]]; then
|
if [[ "$(file --dereference --mime "$FILE")" =~ binary ]]; then
|
||||||
echo "$1 is a binary file"
|
echo "$1 is a binary file"
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user