add symlink resolution for binary files

master
glmdev 5 years ago
parent 836d00f69a
commit ef105b317a

@ -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

Loading…
Cancel
Save