vendor: update github.com/jlaffaye/ftp
This commit is contained in:
committed by
Nick Craig-Wood
parent
4e64ee38e2
commit
08bf8faa2f
+5
-4
@@ -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
|
||||
|
||||
+10
-2
@@ -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
|
||||
}
|
||||
|
||||
Vendored
+1
-1
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user