forked from TrueCloudLab/rclone
ftp: Fix for go1.6 and go1.7
This commit is contained in:
parent
af043eda15
commit
a9101f8608
1 changed files with 2 additions and 4 deletions
|
@ -134,10 +134,8 @@ func NewFs(name, root string) (ff fs.Fs, err error) {
|
||||||
fullPath = path.Join(u.Path, root)
|
fullPath = path.Join(u.Path, root)
|
||||||
}
|
}
|
||||||
root = fullPath
|
root = fullPath
|
||||||
dialAddr := u.Hostname()
|
dialAddr := u.Host
|
||||||
if u.Port() != "" {
|
if strings.IndexRune(dialAddr, ':') < 0 {
|
||||||
dialAddr += ":" + u.Port()
|
|
||||||
} else {
|
|
||||||
dialAddr += ":21"
|
dialAddr += ":21"
|
||||||
}
|
}
|
||||||
f := &Fs{
|
f := &Fs{
|
||||||
|
|
Loading…
Add table
Reference in a new issue