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.49k stars 45 forks source link

[BUG] - The breadcrumbs path is not fallbacked after a failed enter into the directory #188

Closed Vixb1122 closed 1 year ago

Vixb1122 commented 1 year ago

Description

I found that the logic to enter the directory is to modify the breadcrumbs path first and then enter the directory. If the enter the directory fails, the breadcrumbs path is not fallbacked.

Steps to reproduce

  1. directory structure
    app
    └─ test
    └─ 新文件夹
  2. enter the app/test directory, which contains a Chinese folder
  3. output the following log
    Changed directory on remote: /app
    Changed directory on remote: /app\test
    Could not scan current directory: protocol error (Response contains an invalid syntax)

    Tip: You may have found a wrong path (/app\test) output on Windows

  4. The breadcrumbs path is still <ip>:/app/test, even though entering that directory has failed.

Expected behaviour

Try to enter the directory first, and then update the breadcrumbs after entering successfully.

Environment