Open vejkse opened 3 months ago
So, I ‘fixed’ this by adding a check before a bunch of three tests in statusbar.py
which are using self.fm.thisdir
.
if self.fm.thisdir:
But this doesn’t seem very robust.
I think I never experienced such crashes (including #2873) before 2023. Maybe before that time, when a directory was unavailable, self.fm.thisdir
was a placeholder object instead of None
, preventing those crashes?
Runtime Environment
Current Behavior
ranger crashes in various circumstances when going to a tab whose directory has become inaccessible.
There was already https://github.com/ranger/ranger/issues/2873 that applies only when
update_title
is set totrue
. There are two pull requests solving that issue.I found two new methods to crash ranger when going to an unavailable tab in
ranger --clean
, without having to set any option.Expected Behavior
ranger should not crash but signal that the directory is not available.
First steps to reproduce
/tmp
).a
in that directory, e.g. by running:mkdir a
.a
.a
tob
, e.g. by running:rename b
on it.Second steps to reproduce
Traceback
The traceback is identical in both cases.