diff options
author | hut <hut@lavabit.com> | 2010-03-31 06:24:22 +0200 |
---|---|---|
committer | hut <hut@lavabit.com> | 2010-03-31 06:24:22 +0200 |
commit | ecd0d38655bc2029679cbca030c2e0118ea35f4c (patch) | |
tree | c2f7e2ff29be5e5d661ae6337b6528020e51a08e /ranger | |
parent | 2b6374131b0b9a4bbadc377c256815ca2e2d7f89 (diff) | |
download | ranger-ecd0d38655bc2029679cbca030c2e0118ea35f4c.tar.gz |
core.environment: stop enter_dir if os.chdir fails
Diffstat (limited to 'ranger')
-rw-r--r-- | ranger/core/environment.py | 5 |
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() |