summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorhut <hut@lavabit.com>2011-12-19 14:15:25 +0100
committerhut <hut@lavabit.com>2011-12-19 14:15:25 +0100
commite681682273412e6b26f85bc0dff325f605abb305 (patch)
tree0f7bfe6bed7db8279f40a2d07d4d9a848daa8bc7
parent5efbecb2ec32805541923a72462d10fe58cd32cf (diff)
downloadranger-e681682273412e6b26f85bc0dff325f605abb305.tar.gz
core.fm: Added todo-entry and some fail-safe stuff
-rw-r--r--ranger/core/fm.py2
-rw-r--r--ranger/core/main.py5
2 files changed, 6 insertions, 1 deletions
diff --git a/ranger/core/fm.py b/ranger/core/fm.py
index 9b5cc036..20327a71 100644
--- a/ranger/core/fm.py
+++ b/ranger/core/fm.py
@@ -212,6 +212,8 @@ class FM(Actions, SignalDispatcher):
 
 		finally:
 			if ranger.arg.choosedir and self.env.cwd and self.env.cwd.path:
+				# XXX: UnicodeEncodeError: 'utf-8' codec can't encode character
+				# '\udcf6' in position 42: surrogates not allowed
 				open(ranger.arg.choosedir, 'w').write(self.env.cwd.path)
 			self.bookmarks.remember(env.cwd)
 			self.bookmarks.save()
diff --git a/ranger/core/main.py b/ranger/core/main.py
index 14e4b1f6..b69e3c6d 100644
--- a/ranger/core/main.py
+++ b/ranger/core/main.py
@@ -127,7 +127,10 @@ def main():
 			print("ranger version: %s, executed with python %s" %
 					(ranger.__version__, sys.version.split()[0]))
 			print("Locale: %s" % '.'.join(str(s) for s in locale.getlocale()))
-			print("Current file: %s" % filepath)
+			try:
+				print("Current file: %s" % filepath)
+			except:
+				pass
 			print(crash_traceback)
 			print("ranger crashed.  " \
 				"Please report this traceback at:")