From b83b870ac37a93b6174b98dded06529f573fea03 Mon Sep 17 00:00:00 2001 From: shoopea Date: Fri, 27 Dec 2024 23:07:11 +0100 Subject: [PATCH] debug --- ftp.go | 3 +++ 1 file changed, 3 insertions(+) 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") {