You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Trashing the directory or an error message if it can't trash the directory.
Context
I tried to trash a file. I'm not 100% sure I have the trash set up on this installation, but an error message would be better than Ranger crashing.
Possible Solutions
Trash the directory or put an error message if Ranger can't trash it.
Steps to reproduce
Start Ranger
Click on a Directory
Press the d key.
Press the T key.
See :trash. press the Enter key.
See Ranger ask for confirmation. Press the Y key.
See Ranger crash and ask for the Traceback below.
Traceback
ranger
ranger version: ranger 1.9.3
Python version: 3.10.5 (main, Jun 8 2022, 09:26:22) [GCC 11.3.0]
Locale: en_US.UTF-8
Current file: '/home/paul/nvim-linux64'
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/ranger/core/main.py", line 201, in main
fm.loop()
File "/usr/lib/python3/dist-packages/ranger/core/fm.py", line 383, in loop
ui.handle_input()
File "/usr/lib/python3/dist-packages/ranger/gui/ui.py", line 266, in handle_input
self.handle_key(key)
File "/usr/lib/python3/dist-packages/ranger/gui/ui.py", line 196, in handle_key
elif not DisplayableContainer.press(self, key):
File "/usr/lib/python3/dist-packages/ranger/gui/displayable.py", line 275, in press
focused_obj.press(key)
File "/usr/lib/python3/dist-packages/ranger/gui/widgets/console.py", line 188, in press
self.type_key(key)
File "/usr/lib/python3/dist-packages/ranger/gui/widgets/console.py", line 214, in type_key
self._answer_question(answer)
File "/usr/lib/python3/dist-packages/ranger/gui/widgets/console.py", line 197, in _answer_question
callback(answer)
File "/usr/lib/python3/dist-packages/ranger/config/commands.py", line 759, in _question_callback
self.fm.execute_file(files, label='trash')
File "/usr/lib/python3/dist-packages/ranger/core/actions.py", line 459, in execute_file
filenames = [f.path for f in files]
File "/usr/lib/python3/dist-packages/ranger/core/actions.py", line 459, in <listcomp>
filenames = [f.path for f in files]
AttributeError: 'str' object has no attribute 'path'
ranger crashed. Please report this traceback at:
https://github.com/ranger/ranger/issues
The text was updated successfully, but these errors were encountered:
Same thing happened to me on arch. Under other circumstances (I can't fully recall which) ranger spouted out the same error but without crashing.
If I can reproduce it I will post here again.
Runtime Environment
Debian testing on WSL 2
ranger version: ranger 1.9.3
Python version: 3.10.5 (main, Jun 8 2022, 09:26:22) [GCC 11.3.0]
Locale: en_US.UTF-8
Current Behavior
Ranger crashes
Expected Behavior
Trashing the directory or an error message if it can't trash the directory.
Context
I tried to trash a file. I'm not 100% sure I have the trash set up on this installation, but an error message would be better than Ranger crashing.
Possible Solutions
Trash the directory or put an error message if Ranger can't trash it.
Steps to reproduce
Traceback
The text was updated successfully, but these errors were encountered: