debug
Some checks failed
CodeQL / Analyze (go) (push) Waiting to run
golangci-lint / lint (push) Has been cancelled
Units tests / test (push) Has been cancelled

This commit is contained in:
shoopea 2024-12-27 23:07:11 +01:00
parent edc371677f
commit b83b870ac3

3
ftp.go
View File

@ -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<Path>.*) \(.*\).*$`)
for _, msg := range strings.Split(message, "\n") {