From 08bf8faa2f33e56cb9e5bfdced1b1cdf68b8758c Mon Sep 17 00:00:00 2001 From: Gary Kim Date: Tue, 25 Jun 2019 21:45:30 +0800 Subject: [PATCH] vendor: update github.com/jlaffaye/ftp --- go.mod | 2 +- go.sum | 2 ++ vendor/github.com/jlaffaye/ftp/ftp.go | 9 +++++---- vendor/github.com/jlaffaye/ftp/parse.go | 12 ++++++++++-- vendor/modules.txt | 2 +- 5 files changed, 19 insertions(+), 8 deletions(-) diff --git a/go.mod b/go.mod index 9521ded9b..a23980ecf 100644 --- a/go.mod +++ b/go.mod @@ -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 diff --git a/go.sum b/go.sum index 33b68af63..8940b0eae 100644 --- a/go.sum +++ b/go.sum @@ -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= diff --git a/vendor/github.com/jlaffaye/ftp/ftp.go b/vendor/github.com/jlaffaye/ftp/ftp.go index 5bd19d2c0..4d2ec86c3 100644 --- a/vendor/github.com/jlaffaye/ftp/ftp.go +++ b/vendor/github.com/jlaffaye/ftp/ftp.go @@ -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 diff --git a/vendor/github.com/jlaffaye/ftp/parse.go b/vendor/github.com/jlaffaye/ftp/parse.go index 508f6b57b..620401e89 100644 --- a/vendor/github.com/jlaffaye/ftp/parse.go +++ b/vendor/github.com/jlaffaye/ftp/parse.go @@ -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 } diff --git a/vendor/modules.txt b/vendor/modules.txt index 5ea06f90a..4b6877721 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -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