Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix #2873 WM_NAME now shows "not accessible" in non-existent directories #2896

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

80KiloMett
Copy link

ISSUE TYPE

  • Bug fix

RUNTIME ENVIRONMENT

  • Operating system and version: Arch Linux
  • Terminal emulator and version: Alacritty 0.12.2
  • Python version: 3.11.5
  • Ranger version/commit: 136416c
  • Locale: en_US.UTF-8

CHECKLIST

  • The CONTRIBUTING document has been read [REQUIRED]
  • All changes follow the code style [REQUIRED]
  • All new and existing tests pass [REQUIRED]
    • I did not run spellcheck HACKING was not clear which tool to use specifically
  • Changes require config files to be updated
    • Config files have been updated
  • Changes require documentation to be updated
    • Documentation has been updated
  • Changes require tests to be updated
    • Tests have been updated

DESCRIPTION

fixes #2873
Before ranger used to crash with update_title=true setting when trying to display a non-existent directory.
The reason was a call to UI.fm.thisdir.path while UI.fm.thisdir == None when ranger is pointing to a non-existent directory, invalidating the path attribute.
This PR checks if UI.fm.thisdir is None and makes sure WM_NAME shows ranger:not accessible (same as the ranger UI).

MOTIVATION AND CONTEXT

fix crashing issue detailed in #2873

TESTING

make test_py has been run successfully. I was not sure which spellchecker to get, HACKING wasn't super clear on this, sorry.

Changes should not have any effects on the rest of the codebase.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ranger crashes when switching to a tab whose directory doesn’t exist anymore if update_title is set to true
1 participant