summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--ranger/core/environment.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/ranger/core/environment.py b/ranger/core/environment.py
index cdca9782..89088c45 100644
--- a/ranger/core/environment.py
+++ b/ranger/core/environment.py
@@ -165,9 +165,12 @@ class Environment(SettingsAware):
 		except NoDirectoryGiven:
 			return False
 
+		try:
+			os.chdir(path)
+		except:
+			return True
 		self.path = path
 		self.cwd = new_cwd
-		os.chdir(path)
 
 		self.cwd.load_content_if_outdated()