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:")
171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283