add symlink resolution for binary files

This commit is contained in:
glmdev 2018-11-30 17:15:23 -06:00
parent 836d00f69a
commit ef105b317a

View File

@ -292,6 +292,8 @@ elif ( (not active and len(sys.argv) == 2) or (active and len(sys.argv) == 3) ):
if ( is_binary_file(path) ):
filemime = mime.from_file(path)
print("echo Binary file: "+filemime)
if ( filemime == "inode/symlink" ):
print("echo Symlink location: "+os.path.realpath(path))
else:
trows, tcolumns = os.popen('stty size', 'r').read().split()
# if file is taller than the terminal, pipe it to a pretty-print display