about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorhut <hut@lavabit.com>2010-09-13 12:00:03 +0200
committerhut <hut@lavabit.com>2010-09-13 12:00:03 +0200
commiteb8737ec4473b10e2c4d7152f4b8320d3a62c6d5 (patch)
tree4f39317dac94f3898ba2386105c964973290be91
parent63a9639d62c208f78d9e5c8740f10cce74a4e967 (diff)
downloadranger-eb8737ec4473b10e2c4d7152f4b8320d3a62c6d5.tar.gz
fsobject.file: Don't preview sockets
-rw-r--r--ranger/fsobject/file.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/ranger/fsobject/file.py b/ranger/fsobject/file.py
index 0debb44c..5e79c2d1 100644
--- a/ranger/fsobject/file.py
+++ b/ranger/fsobject/file.py
@@ -76,7 +76,9 @@ class File(FileSystemObject):
 	def has_preview(self):
 		if not self.fm.settings.preview_files:
 			return False
-		if not self.accessible or self.is_fifo or self.is_device:
+		if self.is_socket or self.is_fifo or self.is_device:
+			return False
+		if not self.accessible:
 			return False
 		if PREVIEW_WHITELIST.search(self.basename):
 			return True