GiorgosXou / TUIFIManager

A cross-platform terminal-based termux-oriented file manager (and component), meant to be used with a Uni-Curses project or as is.
GNU General Public License v3.0
684 stars 13 forks source link

User-Command `open`-file | `NoneType`-error due to unnecessary call to `__set_label_on_file_selection` #108

Closed GiorgosXou closed 2 months ago

GiorgosXou commented 2 months ago

User-Command 'open' called with a file while self.__clicked_file=None results to Nonetype error due to unnecessary call to __set_label_on_file_selection

eg. in cmds.conf if you have something like: gi | open | 'directory':'~/Desktop/xou/notes/informations.md'| - Informations -

and press gi you are likely to have an error of nonetype if no file selected prior to the command

fixed by removing __set_label...: https://github.com/GiorgosXou/TUIFIManager/blob/73cb068d7edc48df9f153b7b36eb88b3b6ca9eee/TUIFIManager/__init__.py#L347

https://github.com/GiorgosXou/TUIFIManager/blob/73cb068d7edc48df9f153b7b36eb88b3b6ca9eee/TUIFIManager/__init__.py#L368