sftp: expand tilde and environment variables in configured known_hosts_file (#5322)
Fixes #5220
This commit is contained in:
parent
732bc08ced
commit
ce83228cb2
1 changed files with 1 additions and 1 deletions
|
@ -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 a new issue