Fixed empty bookmark name causing termscp to crash

This commit is contained in:
veeso 2021-05-16 22:05:33 +02:00
parent faab67800f
commit 1e3c859ae0
2 changed files with 4 additions and 1 deletions

View file

@ -46,6 +46,7 @@ Released on FIXME: ??
- when you change the protocol in the authentication form and the current port is standard (`< 1024`), the port will be automatically changed to default value for the selected protocol (e.g. current port: `123`, protocol is changes to `FTP`, port becomes `21`)
- Bugfix:
- Fixed wrong text wrap in log box
- Fixed empty bookmark name causing termscp to crash
- Fixed error message not being shown after an upload failure
- Fixed default protocol not being loaded from config
- [Issue 23](https://github.com/veeso/termscp/issues/23): Remove created file if transfer failed or was abrupted

View file

@ -271,7 +271,9 @@ impl AuthActivity {
Some(Payload::One(Value::Usize(0)))
);
// Save bookmark
self.save_bookmark(bookmark_name, save_pwd);
if !bookmark_name.is_empty() {
self.save_bookmark(bookmark_name, save_pwd);
}
// Umount popup
self.umount_bookmark_save_dialog();
// Reload bookmarks