sftp: fix spurious warning when using --sftp-ssh
When using --sftp-ssh we were warning about user/host/port even when they were at their defaults. See: #7235
This commit is contained in:
parent
156c372cd7
commit
11de137660
1 changed files with 1 additions and 1 deletions
|
@ -780,7 +780,7 @@ func NewFs(ctx context.Context, name, root string, m configmap.Mapper) (fs.Fs, e
|
|||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if len(opt.SSH) != 0 && (opt.User != "" || opt.Host != "" || opt.Port != "") {
|
||||
if len(opt.SSH) != 0 && ((opt.User != currentUser && opt.User != "") || opt.Host != "" || (opt.Port != "22" && opt.Port != "")) {
|
||||
fs.Logf(name, "--sftp-ssh is in use - ignoring user/host/port from config - set in the parameters to --sftp-ssh (remove them from the config to silence this warning)")
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue