veeso / termscp

🖥 A feature rich terminal UI file transfer and explorer with support for SCP/SFTP/FTP/S3/SMB
https://termscp.veeso.dev
MIT License
1.55k stars 46 forks source link

[BUG] - Unable to quit the running task such as "search" #116

Closed c02y closed 1 year ago

c02y commented 2 years ago

Description

A clear and concise description of what the bug is.

When I connect to my ftp client successfully, I try to search a keyword in it using F, but it gets stuck in the Searching for "xxx" window, and I cannot quit the job or use other command like F10|Q or F1|H, I have to kill termcp process from other temrinal.

Steps to reproduce

Steps to reproduce the bug you encountered

  1. Connect to a client through FTP
  2. navigate to the client directory
  3. F to search something
  4. it gets stuck, unable to do anything else, have to kill it in other terminal

Expected behaviour

A clear and concise description of what you expected to happen.

It should successfully find or not_find the files/directories instead of getting stuck, and it should not prevent other commands

Environment

Log

Report the snippet of the log file containing the unexpected behaviour. If there is any information you consider to be confidential, shadow it.

Additional information

Add any other context about the problem here.

veeso commented 2 years ago

It's not really a bug, the problem is that currently, the file transfer actions are blocking since everything runs on the same thread.

I've been thinking about refactoring the UI for a long time and putting the file transfer on another thread as a Service, but this would require a huge refactoring and a lot of time, which I'm not going to invest at the moment.

The only thing you can do is to avoid long-time execution searches.