Skip to content

Commit

Permalink
Don't crash on incomplete filter_stack input
Browse files Browse the repository at this point in the history
  • Loading branch information
vifon committed Feb 21, 2024
1 parent 136416c commit 38bb890
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion ranger/config/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -1826,7 +1826,11 @@ def execute(self):

def quick(self):
if self.rest(1).startswith("add name "):
self.fm.thisdir.temporary_filter = re.compile(self.rest(3))
try:
regex = re.compile(self.rest(3))
except re.error:
regex = re.compile("")
self.fm.thisdir.temporary_filter = regex
self.fm.thisdir.refilter()

return False
Expand Down

0 comments on commit 38bb890

Please sign in to comment.