summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorhut <hut@lavabit.com>2010-06-09 13:23:27 +0200
committerhut <hut@lavabit.com>2010-06-09 13:31:26 +0200
commit39bf5e5a4d927c7eaf0eef0de9fd66757e8e23c5 (patch)
tree96999bd6f676d0a5eeeb6effb629b4c4bcde0d55
parentacf16d12e99a2543ef9f87c0bd9c9a7c77c0f90b (diff)
downloadranger-39bf5e5a4d927c7eaf0eef0de9fd66757e8e23c5.tar.gz
fsobject.file: blacklist /proc/kcore for previewing
-rw-r--r--TODO4
-rw-r--r--ranger/fsobject/file.py2
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