ftp: Fix for go1.6 and go1.7

This commit is contained in:
Nick Craig-Wood 2017-05-16 20:19:03 +01:00
parent af043eda15
commit a9101f8608

View File

@ -134,10 +134,8 @@ func NewFs(name, root string) (ff fs.Fs, err error) {
fullPath = path.Join(u.Path, root)
}
root = fullPath
dialAddr := u.Hostname()
if u.Port() != "" {
dialAddr += ":" + u.Port()
} else {
dialAddr := u.Host
if strings.IndexRune(dialAddr, ':') < 0 {
dialAddr += ":21"
}
f := &Fs{