vendor: update github.com/jlaffaye/ftp

s3-about
Gary Kim 2019-06-25 21:45:30 +08:00 committed by Nick Craig-Wood
parent 4e64ee38e2
commit 08bf8faa2f
5 changed files with 19 additions and 8 deletions

2
go.mod
View File

@ -21,7 +21,7 @@ require (
github.com/google/go-querystring v1.0.0 // indirect
github.com/gopherjs/gopherjs v0.0.0-20190411002643-bd77b112433e // indirect
github.com/hashicorp/golang-lru v0.5.1 // indirect
github.com/jlaffaye/ftp v0.0.0-20190519203911-8f5b34ce006f
github.com/jlaffaye/ftp v0.0.0-20190624084859-c1312a7102bf
github.com/kardianos/osext v0.0.0-20190222173326-2bc1f35cddc0 // indirect
github.com/koofr/go-httpclient v0.0.0-20180104120329-03786175608a
github.com/koofr/go-koofrclient v0.0.0-20190131164641-7f327592caff

2
go.sum
View File

@ -100,6 +100,8 @@ github.com/jlaffaye/ftp v0.0.0-20190427163646-6a014d5e22e6 h1:L8GOc4DyMAj4NyTq5H
github.com/jlaffaye/ftp v0.0.0-20190427163646-6a014d5e22e6/go.mod h1:lli8NYPQOFy3O++YmYbqVgOcQ1JPCwdOy+5zSjKJ9qY=
github.com/jlaffaye/ftp v0.0.0-20190519203911-8f5b34ce006f h1:oUoY3Lvi7PD1F3CuayxfdJtwmKV7WNQBdXt8fK1breU=
github.com/jlaffaye/ftp v0.0.0-20190519203911-8f5b34ce006f/go.mod h1:lli8NYPQOFy3O++YmYbqVgOcQ1JPCwdOy+5zSjKJ9qY=
github.com/jlaffaye/ftp v0.0.0-20190624084859-c1312a7102bf h1:2IYBd5TD/maMqTU2YUzp2tJL4cNaOYQ9EBullN9t9pk=
github.com/jlaffaye/ftp v0.0.0-20190624084859-c1312a7102bf/go.mod h1:lli8NYPQOFy3O++YmYbqVgOcQ1JPCwdOy+5zSjKJ9qY=
github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af h1:pmfjZENx5imkbgOkpRUYLnmbU7UEFbjtDA2hxJ1ichM=
github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k=
github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU=

View File

@ -59,10 +59,11 @@ type dialOptions struct {
// Entry describes a file and is returned by List().
type Entry struct {
Name string
Type EntryType
Size uint64
Time time.Time
Name string
Target string // target of symbolic link
Type EntryType
Size uint64
Time time.Time
}
// Response represents a data-connection

View File

@ -73,8 +73,10 @@ func parseRFC3659ListLine(line string, now time.Time, loc *time.Location) (*Entr
// the UNIX ls command.
func parseLsListLine(line string, now time.Time, loc *time.Location) (*Entry, error) {
// Has the first field a length of 10 bytes?
if strings.IndexByte(line, ' ') != 10 {
// Has the first field a length of exactly 10 bytes
// - or 10 bytes with an additional '+' character for indicating ACLs?
// If not, return.
if i := strings.IndexByte(line, ' '); !(i == 10 || (i == 11 && line[10] == '+')) {
return nil, errUnsupportedListLine
}
@ -133,6 +135,12 @@ func parseLsListLine(line string, now time.Time, loc *time.Location) (*Entry, er
e.Type = EntryTypeFolder
case 'l':
e.Type = EntryTypeLink
// Split link name and target
if i := strings.Index(e.Name, " -> "); i > 0 {
e.Target = e.Name[i+4:]
e.Name = e.Name[:i]
}
default:
return nil, errUnknownListEntryType
}

2
vendor/modules.txt vendored
View File

@ -98,7 +98,7 @@ github.com/google/go-querystring/query
github.com/hashicorp/golang-lru/simplelru
# github.com/inconshreveable/mousetrap v1.0.0
github.com/inconshreveable/mousetrap
# github.com/jlaffaye/ftp v0.0.0-20190519203911-8f5b34ce006f
# github.com/jlaffaye/ftp v0.0.0-20190624084859-c1312a7102bf
github.com/jlaffaye/ftp
# github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af
github.com/jmespath/go-jmespath