From ecd4d28918899b178b26444a34f409f2ee0873ac Mon Sep 17 00:00:00 2001 From: hut Date: Sun, 2 Oct 2011 21:08:41 +0200 Subject: core.actions: smarter open() in get_preview --- ranger/core/actions.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ranger/core/actions.py') diff --git a/ranger/core/actions.py b/ranger/core/actions.py index b1758e34..ef616fd1 100644 --- a/ranger/core/actions.py +++ b/ranger/core/actions.py @@ -662,7 +662,7 @@ class Actions(FileManagerAware, EnvironmentAware, SettingsAware): return found else: try: - return open(path, 'r') + return codecs.open(path, 'r', errors='ignore') except: return None -- cgit 1.4.1-2-gfad0