about summary refs log tree commit diff stats
path: root/ranger/container
diff options
context:
space:
mode:
authorhut <hut@lavabit.com>2009-12-15 23:44:49 +0100
committerhut <hut@lavabit.com>2009-12-15 23:44:49 +0100
commite48e3c5c5046bf992a563d112629f10a3adc8168 (patch)
treeeb1a41180d2918dbe78da52b3730fa53fc6bf6a2 /ranger/container
parent7ec262f86c81c4df4360643b05dfb788d294a8ae (diff)
downloadranger-e48e3c5c5046bf992a563d112629f10a3adc8168.tar.gz
fixed CD command / tab completion
Diffstat (limited to 'ranger/container')
-rw-r--r--ranger/container/environment.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/ranger/container/environment.py b/ranger/container/environment.py
index a6d291cf..11c0082b 100644
--- a/ranger/container/environment.py
+++ b/ranger/container/environment.py
@@ -1,4 +1,4 @@
-from os.path import abspath, normpath, join, expanduser
+from os.path import abspath, normpath, join, expanduser, isdir
 from ranger.fsobject.directory import Directory, NoDirectoryGiven
 from ranger.container import KeyBuffer, History
 from ranger.shared import SettingsAware
@@ -91,6 +91,9 @@ level <0 => parent directories"""
 		# get the absolute path
 		path = normpath(join(self.path, expanduser(path)))
 
+		if not isdir(path):
+			return
+
 		try:
 			new_pwd = self.get_directory(path)
 		except NoDirectoryGiven: