mirror of
https://github.com/rclone/rclone.git
synced 2024-12-23 15:38:57 +01:00
sftp: expand tilde and environment variables in configured known_hosts_file (#5322)
Fixes #5220
This commit is contained in:
parent
732bc08ced
commit
ce83228cb2
@ -566,7 +566,7 @@ func NewFs(ctx context.Context, name, root string, m configmap.Mapper) (fs.Fs, e
|
||||
}
|
||||
|
||||
if opt.KnownHostsFile != "" {
|
||||
hostcallback, err := knownhosts.New(opt.KnownHostsFile)
|
||||
hostcallback, err := knownhosts.New(env.ShellExpand(opt.KnownHostsFile))
|
||||
if err != nil {
|
||||
return nil, errors.Wrap(err, "couldn't parse known_hosts_file")
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user