From 39bf5e5a4d927c7eaf0eef0de9fd66757e8e23c5 Mon Sep 17 00:00:00 2001 From: hut Date: Wed, 9 Jun 2010 13:23:27 +0200 Subject: fsobject.file: blacklist /proc/kcore for previewing --- TODO | 4 ++-- ranger/fsobject/file.py | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/TODO b/TODO index 1e02251c..1577f97a 100644 --- a/TODO +++ b/TODO @@ -51,7 +51,7 @@ General (X) #71 10/03/21 previews: black/whitelist + read file (X) #79 10/04/08 tab number zero ( ) #80 10/04/08 when closing tabs, avoid gaps? - ( ) #81 10/04/15 system crash when previewing /proc/kcore with root permissions + (X) #81 10/04/15 system crash when previewing /proc/kcore with root permissions (X) #83 10/04/19 better ways to mark files. eg by regexp, filetype,.. ( ) #86 10/04/21 narg for move_parent ( ) #60 10/02/05 utf support improvable @@ -115,5 +115,5 @@ Ideas Blocking ( ) #60 10/02/05 utf support improvable - ( ) #81 10/04/15 system crash when previewing /proc/kcore with root permissions + (X) #81 10/04/15 system crash when previewing /proc/kcore with root permissions diff --git a/ranger/fsobject/file.py b/ranger/fsobject/file.py index 2619fa35..0debb44c 100644 --- a/ranger/fsobject/file.py +++ b/ranger/fsobject/file.py @@ -82,6 +82,8 @@ class File(FileSystemObject): return True if PREVIEW_BLACKLIST.search(self.basename): return False + if self.path == '/dev/core' or self.path == '/proc/kcore': + return False if self.extension not in ('zip',) and self.is_binary(): return False return True -- cgit 1.4.1-2-gfad0