diff --git a/ftp.go b/ftp.go index 7114895..cfb648d 100644 --- a/ftp.go +++ b/ftp.go @@ -8,6 +8,7 @@ import ( "context" "crypto/tls" "errors" + "fmt" "io" "net" "net/textproto" @@ -1101,6 +1102,8 @@ func (c *ServerConn) Search(pattern string) ([]string, error) { return nil, err } + fmt.Printf("SEARCH:\r\n-----------------------------------\r\n%s\r\n-----------------------------------\r\n", message) + msgs := make([]string, 0) re := regexp.MustCompile(`^200- (?P.*) \(.*\).*$`) for _, msg := range strings.Split(message, "\n") {