summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--ranger/defaults/commands.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/ranger/defaults/commands.py b/ranger/defaults/commands.py
index d3c05023..b874c5fa 100644
--- a/ranger/defaults/commands.py
+++ b/ranger/defaults/commands.py
@@ -73,9 +73,8 @@ class cd(Command):
 
 	def execute(self):
 		line = parse(self.line)
-		try:
-			destination = line.rest(1)
-		except IndexError:
+		destination = line.rest(1)
+		if not destination:
 			destination = '~'
 
 		if destination == '-':
9'>79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104