Browse Source

add symlink resolution for binary files

glmdev 4 months ago
parent
commit
ef105b317a
1 changed files with 2 additions and 0 deletions
  1. 2
    0
      do_what.py

+ 2
- 0
do_what.py View File

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

Loading…
Cancel
Save