mirror of
https://github.com/veeso/termscp.git
synced 2026-04-08 11:11:36 -07:00
issue 150: some issues with configuration (#151)
* issue 150: some issues with configuration
This commit is contained in:
committed by
GitHub
parent
67df3dc76a
commit
1ecef6fc16
@@ -52,8 +52,15 @@ impl Default for RemoteConfig {
|
||||
let mut ssh_config_path = "~/.ssh/config".to_string();
|
||||
ssh_config_path = ssh_config_path.replacen('~', &home_dir.to_string_lossy(), 1);
|
||||
|
||||
// check if ssh config path exists first
|
||||
let ssh_config_path = if PathBuf::from(&ssh_config_path).exists() {
|
||||
Some(ssh_config_path)
|
||||
} else {
|
||||
None
|
||||
};
|
||||
|
||||
Self {
|
||||
ssh_config: Some(ssh_config_path),
|
||||
ssh_config: ssh_config_path,
|
||||
ssh_keys: HashMap::default(),
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user